View Full Version : need some algorithms
Silicate Wielder
February 22nd, 2012, 07:47 PM
Ok, so I plan on making a 3D graphics generator and what i want to do is render some interactive 3D objects in Scratch VM, Anyone know of any 3D generation algorithims?
the most they will do for simple geometric figures is to just turn and maybe resize if possible. this will only render mesh frame.
TheMatrix
February 22nd, 2012, 08:33 PM
This can't be all too hard.
You know that a geometric figure is a collection of points in 3 axis(in this case), right? Good, now you just need to be able to get their values. Let's say you want a cube.
You know what it looks like, all sides are the same. Now let's assume you want one with side lengths of 5. Starting from the origin, you would have the following points:
A(0, 0, 0)
B(5, 0, 0)
C(0, 5, 0)
D(0, 0, 5)
E(5, 5, 0)
F(0, 5, 5)
G(5, 0, 5)
H(5, 5, 5)
Do you see the pattern? Draw a cube with the points I gave you, and you will see.
Plotting is your next step. I don't know how you would do that in the scratch thing, but I'm sure there's a library for it somewhere.
Resizing this cube is a simple matter of changing the 5 to another number.
Turning is a complicated issue that I have no idea about. You'll have to look elsewhere for that.
Silicate Wielder
February 22nd, 2012, 08:59 PM
This can't be all too hard.
You know that a geometric figure is a collection of points in 3 axis(in this case), right? Good, now you just need to be able to get their values. Let's say you want a cube.
You know what it looks like, all sides are the same. Now let's assume you want one with side lengths of 5. Starting from the origin, you would have the following points:
A(0, 0, 0)
B(5, 0, 0)
C(0, 5, 0)
D(0, 0, 5)
E(5, 5, 0)
F(0, 5, 5)
G(5, 0, 5)
H(5, 5, 5)
Do you see the pattern? Draw a cube with the points I gave you, and you will see.
Plotting is your next step. I don't know how you would do that in the scratch thing, but I'm sure there's a library for it somewhere.
Resizing this cube is a simple matter of changing the 5 to another number.
Turning is a complicated issue that I have no idea about. You'll have to look elsewhere for that.
Go to Scratch.mit.edu to find out what scratch VM is :) I'm going to switch to Stencyl once I figure out how it works and how to use it.
Also, I have made a 3D frame mesh scene generator but I lost it before i could add in terrain altering and movement simulation
TheMatrix
February 23rd, 2012, 12:51 PM
Go to Scratch.mit.edu to find out what scratch VM is :)
I know what Scratch is -- it's just modified Java.
I'm going to switch to Stencyl once I figure out how it works and how to use it.
http://www.virtualteen.org/forums/images/icons/icon14.gif
vBulletin® v3.8.9, Copyright ©2000-2021, vBulletin Solutions, Inc.