Page 1 of 1

3D Cube with canvas with rotation

PostPosted: Thu Aug 06, 2009 11:00 am
by Bee-Ant
Yes I'm experimenting 3D stuff with canvas. And here's the second demo.
Thanks to fuzzy for the elipse code (sin,cos,degtorad)
You can use this stuff to make 3D room :D
Enjoy.

Re: 3D Cube with canvas with rotation

PostPosted: Fri Aug 07, 2009 4:18 am
by DST
This demo sucks!

Haha just kidding!

:D

Its interesting though, what makes it slow down is lots of draw, an issue with the canvas. When i look more top down at it, it rotates fast, but from a more side view, its slow.

It lends some possibilities to the raycasting demo from before, that if you can minimize the drawing the canvas must do, by using the bitmap renderer instead, you could get some good speed from it.

Perhaps if you had texture sets, with all the sizes,....i mean, in wolfenstein, the walls only rotate on the x/z axis, but never the y axis.(i'm calling x the angle rotation and z is the depth(zoom) of the object). If someone can put all these puzzle pieces together, i'm sure there's a way to make a fast 3d program with no need for gpu.

Basically, take Feral's 3d examples which ran fast,combined with yours which are more convincing....perhaps it can be done!

Re: 3D Cube with canvas with rotation

PostPosted: Fri Aug 07, 2009 6:01 am
by Bee-Ant
I didnt know that it slow. Because it ran well on my lappy from any side of view.
Feral's 3D...that 3D box platform right?

Hmmm...first of all, I'm still new at this stuff. So I still dont know how to read and render bitmap. But yes, I will think about the perfomance by reducing the drawing.

Re: 3D Cube with canvas with rotation

PostPosted: Fri Aug 07, 2009 10:09 am
by Fuzzy
Great job using the ellipse example for this. That is the sort of logic that a good programmer uses. The code underneath is very much the same, but the appearance is quite different.

Re: 3D Cube with canvas with rotation

PostPosted: Fri Aug 07, 2009 1:15 pm
by Bee-Ant
Yes :D
I use 4 points x y that decided by 4 angles(0,90,180,270). Connect point 1 to 2,2 to 3,3 to 4,4 to 1 using moveto and lineto. This is for basic square without filling.

Ummm,one thing that im unable to do fuzz, how do i fill the top square of the cube?I could make some points that follow line 1-2(the line that formed of point 1 and 2) but i cant pull lines to fill the top square.arkghhh...my cube isnt perfect after all...

Re: 3D Cube with canvas with rotation

PostPosted: Tue Jan 26, 2010 9:34 am
by Turon
This all sounds exciting! :D

Re: 3D Cube with canvas with rotation

PostPosted: Wed Jan 27, 2010 3:14 am
by Scorpion50o1
You be able to edit this with color and make a rubics cube game of some sort? :) hope this was helpful somehow.

Re: 3D Cube with canvas with rotation

PostPosted: Fri Mar 05, 2010 2:58 am
by Hblade
Exelent stuff, bee :3

Re: 3D Cube with canvas with rotation

PostPosted: Sat Mar 06, 2010 11:42 pm
by Hblade
It's amazing, nice job :)

Re: 3D Cube with canvas with rotation

PostPosted: Sun Mar 07, 2010 4:52 am
by Bee-Ant
You just found it??
Thanx anyway

Re: 3D Cube with canvas with rotation

PostPosted: Sun Mar 07, 2010 12:54 pm
by Hblade
Well, uh.. no but I wanted to compliment it again >.>

Re: 3D Cube with canvas with rotation

PostPosted: Fri Dec 31, 2010 12:30 am
by edwardfanboy
How the ? do you make my little tetrahedron rotate vertically then?

Re: 3D Cube with canvas with rotation

PostPosted: Fri Dec 31, 2010 4:33 am
by Bee-Ant
edwardfanboy wrote:do you make my little tetrahedron rotate vertically then?

You are asking my help to make it be able to vertically rotate or what?