GIDForums  

Go Back   GIDForums > Computer Programming Forums > FLTK Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 21-Oct-2004, 15:49
rohan_iitd rohan_iitd is offline
New Member
 
Join Date: Oct 2004
Posts: 1
rohan_iitd is on a distinguished road

2d/3d And 3d/2d Project......(fltk)


I have been given a project in my college of converting 3d object to any 2d view and also reconstructing a 3d object from 2 appropriate 2d views using fltk.

I have 2 questions:
1)I wanted to use the z buffer algo for hidden line elimination.But for that i need all the pixels in the polygon.
Is there any function in FLTK for that??
If not possible what is the best method under fltk for hidden line elimination.....(I am only working on non-curvillinear objects and without cutting planes.)

2)For the 3d reconstruction,what all do i require?
Do i require all the planes of the solid figure before hand only along with all the linesegment projections.
The user is also providing me correpondence between the points of the two planes.

Is that 3d thing possible in fltk i.e I wanted to take the input graphically through event handling.

Please do respond as the project submission date is coming closer......

Thanks

rohan
  #2  
Old 23-Nov-2004, 00:15
MatthiasWM MatthiasWM is offline
VIP
 
Join Date: Nov 2004
Posts: 62
MatthiasWM will become famous soon enough
Quote:
Originally Posted by rohan_iitd
I wanted to use the z buffer algo for hidden line elimination.

FLTK offers the OpenGL render context (Fl_Gl_Window) that will do everything for you. See teh 'cube' example. If you are required to write this program "by foot" instead of using this great library, I recommend that you either use a scanline based approach, or sort the polygons back to front before rendering (painters math ;-)

Quote:
Originally Posted by rohan_iitd
For the 3d reconstruction,what all do i require?

Whoa, this can become a rather complex task. But in general, the user provides two 2d coordinates in a 3d world. If you unproject the camera position and direction, you'll end up with two lines in 3d space. Find the intersection of those two lines, and, tadaa, there's your 3d point.

Quote:
Is that 3d thing possible in fltk i.e I wanted to take the input graphically through event handling.

Absolutely yes. Start by deriving your own class from Fl_GL_Window, then copy the code that renders a cube. Start implementing your own 'handle()' function to get user events. Etc. etc. ...
 
 

Recent GIDBlogToyota - 2008 September Promotion by Nihal

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

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
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Tutorial] GUI programming with FLTK dsmith FLTK Forum 10 03-Oct-2005 15:41
FLTK with GLUT usmsci FLTK Forum 4 26-Nov-2004 16:21
Welcome to the FLTK Forums dsmith FLTK Forum 0 08-Sep-2004 06:58
Help with project. anignna C Programming Language 12 27-Apr-2004 07:51

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 20:55.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.