Posted: 6th Jun 2003 21:05
Hello

Sorry but i'm very bad in math can you help me. I'll want a sphere who is a planet with valley, mountain .... But for modify the sphere it'll need math :-(


I can modify the point with facility but i don't know the value of the points.
Posted: 7th Jun 2003 19:43
I would suggest to create an object with some 3D modeller and load it in your game.
Besides, If you're not used to mathematics, I suppose you didn't create many game until now, right ?
(Spoken Language ?)
Posted: 8th Jun 2003 8:26
I have no 3d modeller and if i want make by math it's just by curiosity. I think it's more simple and speed to generate a planet with a code instead of generate a planet by a 3d modeller.
Posted: 8th Jun 2003 9:07
save mesh should pump out a data file in the x format from a primitive sphere.

from here you could apply data alteration to the vertices and polys with a memblock perhaps like the vertice changing example of a cube shown on this forum a short while back in time.
Posted: 8th Jun 2003 18:48
@indi

This one?

http://www.darkbasicpro.com/apollo/view.php?t=11300&b=6
Posted: 9th Jun 2003 7:37
I cant find the post but i saved the code snippet

+ Code Snippet
`standard setup
Sync on : sync rate 5 : autocam off

`*******************************************************************************************

`make a simple object
make object plain 1, 100, 100

`convert
make mesh from object 1, 1
make memblock from mesh 1, 1


`position the camera
position camera 0, 0.0, 0.0, -200.0

`view loop
do

`randomly move vertice all over the place
write memblock float 1, 12, rnd(100) :`X
write memblock float 1, 16, rnd(120) :`Y
write memblock float 1, 20, rnd(105) :`Z

`make object
delete object 1
delete mesh 1
make mesh from memblock 1, 1
make object 1, 1, 0

`mousemove
if mouseclick()=1 then move camera 0, 0.5
if mouseclick()=2 then move camera 0, -0.5

`mouselook
yrotate camera 0, camera angle y(0)+ mousemovex()
xrotate camera 0, camera angle x(0)+ mousemovey()

sync
loop