Ralph,Ralph wrote: ↑Wed Oct 14, 2020 11:06 am We had a similar question a while ago, from a company. The part where it gets tricky is when the sphere is going to rotate in all directions, and things project on the sphere need to move in the correct direction and change size if they move away or come closer, and they need to rotate in the correct direction as well. If you put a lot of time into it, it might be possible, but it'll be a struggle.
I agree. not easy and is going to require some engineering and math. Our good friend Tony loves challenges. Perhaps he has done it on the quiet already.
Here is the basic math. All can play with it and find a solution to share with others.
Code: Select all
1) To determine the radius of a of a sphere slice we use <r1 = r*math.cos(degrees)>
2) To determine the y coordinate position we use <y = r*math.sine(degrees)>
3) To determine the x coordinate position we use <x = r*math.cos(degrees)>
4) lua works in radians so to convert degrees to radians we use <degrees*math.pi/180> to get radians.
5) Use for loops to draw the lines, polygons and place text.
6) Use rotate to move the entire canvas clock wise or counter clockwise foR x,y simulation.
Anyway, the pebble has been thrown into the pond. Lets see the ripples.
Keith