3D Plotter

MM2forever

Active Member
Licensed User
Longtime User
Hey B4P scouts!
I dont know if something like this is already posted somewhere around here, at least i didn't find any.

In the attachement there is the source code of a small "3D Engine" ( ;) still a long way to go ^^)

It plots points (given as x,y,z) relative to a 3D center and connects all the pints with lines . I did a predefined "object" within the code:

cube.jpg


A nice Cube^^

Furthermore its possible to rotate this thing with the directional buttons left bottom of the screen.
To my suprise it runs pretty "smooth" on my rx3715.

edit:// added some "AutoRot" where x,y axis are spinning by a timer, for demo purposes. In the editbox you can set up the rotation factor.

If you have any ideas or critics, please write :)

(especially on the question of how i can define where lines are drawn and where not)
 

Attachments

  • 3d.sbp
    3.1 KB · Views: 367
Last edited:

dennishea

Active Member
Licensed User
You are right MM2forever, it's pretty smooth on my dell axiam x50 also.

:) Denny
 

MM2forever

Active Member
Licensed User
Longtime User
yes, but its just one simple box and i still havent figured out how I can remove (not draw) the lines going inside the box or crossing the planes.
I guess i have to define where points have to be connected in the geometry data of the actual object,
the engine cant decide this on its own.

I will add a FPS counter and once only the necessary 12 lines are drawn each time it will run pretty smooth (i hope)

edit:// I Have updated the source code, now it has a simple FPS counter. (Hope i coded it the right way)
I usually get 16 FPS on the Desktop and 5/4 on the Device (yeah, pretty poor)

edit[15/10/08|20:02]://
I have worked around the issue of the "too much lines" with a matrix, having the dimension of the "existing points*existing points" with booleans wether there is a line between them or not (i know, some doubles in there, but i made it only 12 true's)

cube_reduced.jpg


You can add/remove lines by adding more "true's" to the matrix

I have change the drawing method to the drawer of the imagelib, but no speed increasing.

Im not sure if this program is any useful since its still pretty slow and will never become faster i think.

I noticed that the speed is not a matter of lines to draw but more matter of the drawing and refreshing procedure itself.
 

Attachments

  • 3d.zip
    4.6 KB · Views: 302
Last edited:
Top