[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference 7.286::atarist

Title:Atari ST, TT, & Falcon
Notice:Please read note 1.0 and its replies before posting!
Moderator:FUNYET::ANDERSON
Created:Mon Apr 04 1988
Last Modified:Tue May 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:1433
Total number of notes:10312

27.0. "Hidden line removal" by CHEST::BADMAN (Better Late Than Forever) Thu Apr 07 1988 15:29

    Hello.
    
    Does anybody have routine to perform hidden line removal on a wireframe
    object, or maybe someone knows a little of the theory ? Also, rotation
    and perspective routines would be appreciated.
    
    Any help given would be greatly appreciated.
    
    
    
    				Jamie.
T.RTitleUserPersonal
Name
DateLines
27.1graphics infoCIMBAD::POWERSI Dream Of Wires - GNThu Apr 07 1988 20:2517
    
    re .0
    
         I have some stuff that does rotation, scaling, etc. of three
    dimensional objects.  The way this is done is with transformation
    matricies.  If you are interested in the theory behind this I suggest
    the graphics book by Foley & Vandam (sp).  I have just a few finishing
    touches to put on a program for the st which allows the user to
    type in a function y in terms of x and z, and plots it on the screen
    in three dimensions, doing hidden line removal.  Actually doing
    hidden line removal is pretty easy on an st.  you can break your
    object up into polygons, and use the vdi routine polyline, and have
    it fill in the polygon as it is drawn.  if you draw the object from
    the back to the front, all the lines behind surface get erased.
    
    Bill Powers
    
27.2Principles off Computer GraphicsUTROP1::TRAMONTINAFri Apr 08 1988 06:5415
    re .0
    
    If you are intrested in Graphic algorithms you might want to read
    a book called "Principles of Computer Graphics" by Leendert Ammeraal.
    He is a teacher at a Techical University in Holland. The book presents
    programms written in C, the programms are highly machine independant.
    They just need some routines like Plot and Move. 
    Some people (mostly the man's students, as me) think the book isn't very
    easy to read but what you all want is in there.
    The book is published by an American publisher so it shouldn't be
    too hard to find it.
    
    greetings from a sunny Europe,
    
    Renato.
27.3Thankyou.CHEST::BADMANBetter Late Than ForeverMon Apr 11 1988 10:586
    Thanks for the ideas ... I never thought of polyline as an automatic
    HLR routine!
    
    
    
    				Jamie.
27.4Start at the frontWELMTS::GIBSONAlan Gibson @WLOTue Apr 12 1988 12:4710
    re .1:
    
    For plotting the function z=f(x,y), it's actually more efficient
    to plot from the front than the back.  The principle is that for
    each calculated point on a screen column (ie x-coordinate), note
    the maximum plotted y-coordinate.  If a new y-value is higher, plot
    it and increase the maximum.  If it's lower, don't plot it.
    
    I can give you a pointer to an algotithm if you're interested. 
    It's in one of the books published by McGraw-Hill.
27.5plotting methodsCIMBAD::POWERSI Dream Of Wires - GNTue Apr 12 1988 13:5513
               
    RE .4
    
         Yes, I was aware of that algorithm, but that means i would
    have to write a routine to generate all the points between two points
    on a screen, make the test, and set each point on the screen
    individually.  I figured the way I did it was quicker, then setting
    each point individually.  I believe cause essentially the linea
    routines would have to get called for each pixel (very expensive)
    as to once for each line.  Also, it was much less coding for me
    to do.
    
    Bill Powers