Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Share Your Creations
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Share Your Creations Show your developed application to Basic4ppc community. Please include source code if possible.

3D Plotter

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-14-2008, 03:04 PM
MM2forever's Avatar
Senior Member
 
Join Date: Jun 2007
Location: Germany
Posts: 103
Send a message via ICQ to MM2forever Send a message via MSN to MM2forever Send a message via Skype™ to MM2forever
Default 3D Plotter

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:



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)
Attached Files
File Type: sbp 3d.sbp (3.1 KB, 93 views)
__________________
Regards, Christian


Last edited by MM2forever : 10-15-2008 at 06:59 AM. Reason: minor changes in source/attachment managing
Reply With Quote
  #2 (permalink)  
Old 10-14-2008, 11:27 PM
Senior Member
 
Join Date: Jul 2007
Location: Michigan Usa
Posts: 176
Awards Showcase
Beta Tester 
Total Awards: 1
Default

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

Denny
__________________
Using 6.90
dennishea
Reply With Quote
  #3 (permalink)  
Old 10-15-2008, 06:45 AM
MM2forever's Avatar
Senior Member
 
Join Date: Jun 2007
Location: Germany
Posts: 103
Send a message via ICQ to MM2forever Send a message via MSN to MM2forever Send a message via Skype™ to MM2forever
Default

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)



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.
Attached Files
File Type: zip 3d.zip (4.6 KB, 58 views)
__________________
Regards, Christian


Last edited by MM2forever : 10-15-2008 at 06:14 PM.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On


All times are GMT. The time now is 12:06 PM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0