forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

3D graphics in clearwin

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+
View previous topic :: View next topic  
Author Message
Anupriya



Joined: 27 Mar 2009
Posts: 11

PostPosted: Mon Mar 30, 2009 3:37 pm    Post subject: 3D graphics in clearwin Reply with quote

hello,
I am presently working on simple plot and trying to draw poly lines with x,y,z array of coordinates. For eg the coordinates are as follows

x y z h
-5.238 0.012 0.558 66666
-5.238 0.032 0.648 66666
-5.238 0.123 0.765 99999
1.258 1.230 1.258 66666
1.258 1.342 1.526 66666
......... and so on

when value of h is 99999 the pen plotter should move to x value (for eg 1.258 in this case) and continue drawing poly line until next h value(99999).

the subroutine VSPLDR(x,y,z,npts) draws poly lines in continuously,but i have do draw polylines in broken fashion.Any help on this issue is appreciated. thank you
Back to top
View user's profile Send private message
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2388
Location: Yateley, Hants, UK

PostPosted: Sat Apr 04, 2009 1:54 pm    Post subject: Reply with quote

As you appear to be drawing a general purpose graphic, and not a graph with all the associated axes, labelling etc, I suggest that you do not use SimplePlot, but instead use the graphics primitives in Clearwin+.

It isn't clear if you want to draw your line segment by segment, in which case you should use CALL DRAW_LINE_BETWEEN@ instead of DRAW_POLYLINE@. or if you want to draw with a dashed or dotted line, which you can select with SET_LINE_STYLE@ (and maybe also with SET_LINE_WIDTH@).

You have a further option to use OpenGL

Eddie
Back to top
View user's profile Send private message
Anupriya



Joined: 27 Mar 2009
Posts: 11

PostPosted: Mon Apr 06, 2009 4:41 pm    Post subject: Reply with quote

Thank you for your reply.
but i am drawing polylines making use of x,y,z points. the subroutines you specified has arguments for only x,y .does clearwin has subroutines that are used to draw 3D drawings.
any help on this is appreciated.
thank you.
Back to top
View user's profile Send private message
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2388
Location: Yateley, Hants, UK

PostPosted: Mon Apr 06, 2009 11:50 pm    Post subject: Reply with quote

Hi,

On screen, you can only see 2D. If you have a 3D object, and wish to draw it with ClearWin primitives, then you have to sort out the orientation, any perspective, and then the "z-order". This is difficult, so I appreciate your reluctance to do it, and your preference for a system that does it for you.

If you are just drawing lines, as a pen plotter would do, then you can just draw the lot. This works reasonably well if there are not too many lines. The transformation from x,y,z to a viewport x', y' coordinate system isn't too complicated, especially if perspective isn't involved (e.g. if you are drawing an isometric view). The transformations are dealt with in a lot of books, e.g. Angell & Griffith's book. Hidden line removal is always difficult.

However, if you program in OpenGL, you get the whole 3D library with far more sophisticated facilities for shading etc. FTN95 interfaces extremely well with OpenGL from what I have seen. The problem is that OpenGL is a lot more complicated than SimplePlot - and the instructions in FTN95.chm are basic, to say the least! Several other forum users program in OpenGL and they may recommend a book.

Eddie
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+ All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group