CatsUnited

Sorry if this doesn't belong in the AT forums, I just think it sounds advanced
I would like to know how to do an elliptical orbit for a circular object orbiting around another object.

NickyNouse

If the ellipse can be stretched only on the x or y axis, try:
forever
set [i v] to [1]
repeat (360)
go to x:((center-x) + ((x-radius) * ([cos v] of (i)))) y:((center-y) + ((y-radius) * ([sin v] of (i))))
change [i v] by (1)
end
end

If you need something more complicated than that, you could try looking up “parametric equation of an ellipse,” although I'm sure I've seen some orbit projects around here and you could probably steal the code from there.

CatsUnited

NickyNouse wrote:

If the ellipse can be stretched only on the x or y axis, try:
forever
set [i v] to [1]
repeat (360)
go to x:((center-x) + ((x-radius) * ([cos v] of (i)))) y:((center-y) + ((y-radius) * ([sin v] of (i))))
change [i v] by (1)
end
end

If you need something more complicated than that, you could try looking up “parametric equation of an ellipse,” although I'm sure I've seen some orbit projects around here and you could probably steal the code from there.
Okay, I'll test it out soon.

gtoal

NickyNouse wrote:

If you need something more complicated than that, you could try looking up “parametric equation of an ellipse,” although I'm sure I've seen some orbit projects around here and you could probably steal the code from there.

Like so: https://scratch.mit.edu/projects/56127958/

(Literally a 2 minute hack to remix)

CatsUnited

gtoal wrote:

NickyNouse wrote:

If you need something more complicated than that, you could try looking up “parametric equation of an ellipse,” although I'm sure I've seen some orbit projects around here and you could probably steal the code from there.

Like so: https://scratch.mit.edu/projects/56127958/

(Literally a 2 minute hack to remix)
I won't be on the computer again for about 14 hours.

Layzej

Here's one that lets you change the orbit parameters mid-orbit: https://scratch.mit.edu/projects/56143060/

TheHockeyist

You might check out my orrery project here.

(Is this still relevant?)

CatsUnited

TheHockeyist wrote:

You might check out my orrery project here.

(Is this still relevant?)
Sure