Cubes, Spheres and Cones

Blitz3D Forums/Blitz3D Beginners Area/Cubes, Spheres and Cones

pc_tek(Posted 2008) [#1]
Hi all,

Excuse my denseness here...but I am trying to find some code that will create a cube with different colour sides and be spinning.

I have looked at a lot of tutorials but find them too deep for my brain to handle. 2d I can handle, but when it comes to 3d I'm hopeless.

How about a tutorial on how to manipulate cones, cubes and spheres? If there already one written, can someone post the link?


mtnhome3d(Posted 2008) [#2]
to create a cube use mycube=createcube()
to rotate it use turnentity mycube,1,1,1
to color it use entitycolor mycube,255,255,255
change the createcube to create cylinder or cone or sphere.


pc_tek(Posted 2008) [#3]
Thankx, Mayaman...but I need more info than that.

I want to manipulate the width/depth of a cube and to colour the sides too (different colours if possible).


blackbag(Posted 2008) [#4]
Use scaleentity to change the size/shape of the cube,

There are several ways to color sides, I would read up on the following commands, getsurface, countvertices, vertexcolor.

I assume you don't want us to just post code.


Ross C(Posted 2008) [#5]
Look in the archives for code that will unweld a cube. then you can easily set vertexcolor for each vertex :o)


There is also code in the archives that will create a cube with 6 surfaces, thus allowing you to apply a different texture/colour to each side.


pc_tek(Posted 2008) [#6]
Blackbag: Correct. Posting code to disect is hard for me - whilst learning the commands and aspects of each will help me learn more.

Ross: Thanks dude.