User Tools

Site Tools


folkarc:orbitalkit

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
folkarc:orbitalkit [2023/09/29 19:38] discordfolkarc:orbitalkit [2023/11/03 19:51] (current) – [Source] discord
Line 1: Line 1:
 ====== ORBITALKIT ====== ====== ORBITALKIT ======
 +
 +{{folkarc:orbitalkit:programs.mp4?200 | An instance of ORBITALKIT}}
 +
 +Current issues:
 +
 +  * The speed which the actual circle orbits rotate at are really off
 +
  
 ===== Source ===== ===== Source =====
Line 7: Line 14:
 # Create a planet using "Claim $this is Earth" # Create a planet using "Claim $this is Earth"
 # Create a satellite using "Claim $this is a satellite" # Create a satellite using "Claim $this is a satellite"
- +  
 + 
 proc orbitalVelocityAroundEarth {radius} { proc orbitalVelocityAroundEarth {radius} {
     set EarthMass [expr {5.972168 * (10 ** 18)}]     set EarthMass [expr {5.972168 * (10 ** 18)}]
     set G [expr {6.67430 * (10.0 ** (-11.0))}]     set G [expr {6.67430 * (10.0 ** (-11.0))}]
 + 
     return [expr {sqrt(($G * $EarthMass) / $radius)}]     return [expr {sqrt(($G * $EarthMass) / $radius)}]
  
- +  
 + 
 When /someone/ claims /earth_page/ is Earth { When /someone/ claims /earth_page/ is Earth {
     When $earth_page has region /earth/ {     When $earth_page has region /earth/ {
         # Draw a little earth :>         # Draw a little earth :>
         lassign [region centroid $earth] x_earth y_earth         lassign [region centroid $earth] x_earth y_earth
-        Display::circle $x_earth $y_earth 100 5 green 
  
 +        Wish to draw a circle with x $x_earth y $y_earth radius 100 thickness 5 color green 
 + 
         Wish $earth_page is labelled Earth         Wish $earth_page is labelled Earth
 + 
         When /someone/ claims /sat_page/ is a satellite          When /someone/ claims /sat_page/ is a satellite 
             When $sat_page has region /sat/ & the clock time is /t/ & /sat/ has tag /tag/ {             When $sat_page has region /sat/ & the clock time is /t/ & /sat/ has tag /tag/ {
Line 30: Line 38:
                                  
                 # Display the orbit circle                 # Display the orbit circle
-                Display::circle $x_earth $y_earth $radius 5 darkblue+                Wish to draw a circle with x $x_earth $y_earth radius $radius thickness color darkblue filled false 
  
                 set speed [orbitalVelocityAroundEarth [expr {$radius * 1000}]]                 set speed [orbitalVelocityAroundEarth [expr {$radius * 1000}]]
Line 40: Line 48:
  
                 # display the stroke                  # display the stroke 
-                Display::stroke [list [region centroid $earth] [list $x $y]] 1 red+                Wish to draw a stroke with points [list [region centroid $earth] [list $x $y]] width color red 
 +  
 +                Wish to draw a circle with x $x y $y radius 20 thickness 5 color white filled true
  
- +                Wish to draw text with x $x y [expr {$y - 40 }] scale text "[expr {round($speed)}]km/s at [expr {int($radius) * 1000}]km from Earth" radians [region angle $earth] 
-                Display::circle $x $20 5 white true +            } 
-                Display::text $x [expr {$y - 40 }] 1 "[expr {round($speed)}]km/s at [expr {int($radius) * 1000}]km from Earth" [region angle $earth] +
-            }+
         }         }
     }     }
 } }
  
 +When tag /tag/ has corners /corners/ & /tag/ has region /region/ {
 +  Claim $region has tag $tag
 +}
 </file> </file>
folkarc/orbitalkit.1696016338.txt.gz · Last modified: 2023/09/29 19:38 by discord

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki