Hey, pretty much, chalkmarrow! Me trying to respond to Mark0108 somehow triggered yet another epiphany for me with this 3-D space thing. I posted a second version of this gravity simulation, only the second version measures the distance to Gravity (blue ball) as (x^2 + y^2 + z^2)^0.5 rather than (x^2 + y^2)^0.5. In other words, z position affects x and y velocity!! (I know, it was truly a breakthrough for me in my Scratch-making experience!)
Very cool. You may want to take a look at some of the projects that use one-point perspective and include the code for changing 2d x and y as a function of z. For example:
http://www.(link to project)
(If that made no sense, think of it this way: right now, x and y velocity are NOT affected by my simulated z velocity/displacement. You'll notice that the ball makes the same pen patterns on this version that it does on the 2-D one. The patterns are flat in actuality. I can fix it! EUREKA!!!) XD
The distance to Gravity (the blue ball) only counts the x- and y-axis! I can make the movement of the ball much more accurate if I find the ACTUAL distance to it--the square root of the (squared) distances to it on the x-, y-, and z-axies! In actual three dimensions! Which would then in turn affect x and y velocity!! THEY'RE NOT INDEPENDENT!!! (OMGOMGOMG) 8-O
Thanks, man! ...At first, the concept of what I wanted to do confused me... I didn't know how to fake a z-axis. Unfortunately, I didn't mathematically create a "real" z-axis--just a dimension that changed size similarly to how a third dimension would. (Like, I couldn't fake the part about... EPIPHANY!!!!
I had an epiphany today and realized the only thing that I needed to create artificial 3-D simulation was an imaginary z-axis, which would then control size... that's basically how I made this
...ARROW KEYS-- move "Gravity" around.
D-- pen down (also generates random color).
U-- pen up.
C-- clear.
A-- move Gravity backwards (away from you).
S-- move Gravity forwards (towards you).
Have fun!! XD
Comments
You need to be logged in to post comments
Add a Comment
sweet!
(view all replies)Comment Reply
Hey, pretty much, chalkmarrow! Me trying to respond to Mark0108 somehow triggered yet another epiphany for me with this 3-D space thing. I posted a second version of this gravity simulation, only the second version measures the distance to Gravity (blue ball) as (x^2 + y^2 + z^2)^0.5 rather than (x^2 + y^2)^0.5. In other words, z position affects x and y velocity!! (I know, it was truly a breakthrough for me in my Scratch-making experience!)
(view all replies)Comment Reply
Very cool. You may want to take a look at some of the projects that use one-point perspective and include the code for changing 2d x and y as a function of z. For example: http://www.(link to project)
(view all replies)Comment Reply
(If that made no sense, think of it this way: right now, x and y velocity are NOT affected by my simulated z velocity/displacement. You'll notice that the ball makes the same pen patterns on this version that it does on the 2-D one. The patterns are flat in actuality. I can fix it! EUREKA!!!) XD
(view all replies)Comment Reply
The distance to Gravity (the blue ball) only counts the x- and y-axis! I can make the movement of the ball much more accurate if I find the ACTUAL distance to it--the square root of the (squared) distances to it on the x-, y-, and z-axies! In actual three dimensions! Which would then in turn affect x and y velocity!! THEY'RE NOT INDEPENDENT!!! (OMGOMGOMG) 8-O
(view all replies)Comment Reply
Thanks, man! ...At first, the concept of what I wanted to do confused me... I didn't know how to fake a z-axis. Unfortunately, I didn't mathematically create a "real" z-axis--just a dimension that changed size similarly to how a third dimension would. (Like, I couldn't fake the part about... EPIPHANY!!!!
(view all replies)Comment Reply
Dude ... this is sweet.
(view all replies)Comment Reply