folkarc:orbitalkit
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| folkarc:orbitalkit [2023/09/29 21:19] – discord | folkarc:orbitalkit [2023/11/03 19:51] (current) – [Source] discord | ||
|---|---|---|---|
| Line 7: | Line 7: | ||
| * The speed which the actual circle orbits rotate at are really off | * The speed which the actual circle orbits rotate at are really off | ||
| - | ===== Patches needed ===== | ||
| - | |||
| - | Add '' | ||
| ===== Source ===== | ===== Source ===== | ||
| Line 17: | 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 / | When /someone/ claims / | ||
| 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:: | ||
| + | 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 40: | Line 38: | ||
| | | ||
| # Display the orbit circle | # Display the orbit circle | ||
| - | | + | |
| set speed [orbitalVelocityAroundEarth [expr {$radius * 1000}]] | set speed [orbitalVelocityAroundEarth [expr {$radius * 1000}]] | ||
| Line 50: | Line 48: | ||
| # display the stroke | # display the stroke | ||
| - | | + | |
| + | |||
| + | 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 1 text "[expr {round($speed)}]km/ | |
| - | Display:: | + | } |
| - | Display:: | + | |
| - | } | + | |
| } | } | ||
| } | } | ||
| } | } | ||
| + | When tag /tag/ has corners /corners/ & /tag/ has region /region/ { | ||
| + | Claim $region has tag $tag | ||
| + | } | ||
| </ | </ | ||
folkarc/orbitalkit.1696022340.txt.gz · Last modified: by discord
