[comp.sys.amiga.tech] Thick lines.

hamish@waikato.ac.nz (08/16/90)

I've been playing with a program for a while now, but I really need a 
FAST! algorithm for drawing thick lines of any arbitrary width. (In all
rotations). The lines at an angle must also look consistent with the line
straight and be able to be adjusted for aspect ratio. At the moment I use
an assembly routine to draw ellipses (appearing as circles on screen) but
it is too slow. Anyone help me?

Thanks in advance.

-- 
==============================================================================
|  Hamish Marson                        |  Internet  hamish@waikato.ac.nz    |
|  Computer Support Person              |  Phone  (071)562889 xt 8181        |
|  Computer Science Department          |  Amiga 3000 for ME!                |
|  University of Waikato                |                                    |
==============================================================================
|Disclaimer:  Anything said in this message is the personal opinion of the   |
|             finger hitting the keyboard & doesn't represent my employers   |
|             opinion in any way. (ie we probably don't agree)               |
==============================================================================

micja@IDA.LiU.SE (Michael Jansson) (08/16/90)

In article <1237.26ca7370@waikato.ac.nz> hamish@waikato.ac.nz writes:
>
>I've been playing with a program for a while now, but I really need a 
>FAST! algorithm for drawing thick lines of any arbitrary width. (In all
>rotations). The lines at an angle must also look consistent with the line
>straight and be able to be adjusted for aspect ratio. At the moment I use
>an assembly routine to draw ellipses (appearing as circles on screen) but
>it is too slow. Anyone help me?
>
>Thanks in advance.

I think I have something that fits that description. I have a function in
my vFont.library (which is a standard amiga library used for drawing
outline fonts) that will give you the two sides of a poly-line that is
arbitrarily thick. It is consistent for all angels, but I don't adjust for
aspect ration. You could easily adjust that by scaling the poly-line
first, using another function in the library. (Yes the library contains all
sorts of geometrical functions such as rotating, clipping, scaling, moving
etc). Those functions uses only 32-bit integers, lookup-tables etc, so it
is fast and accurate enough for my purpose at least.

The library will be available as a PD/SW/or-something in a couple of weeks
or so...


>
>-- 
>==============================================================================
>|  Hamish Marson                        |  Internet  hamish@waikato.ac.nz    |
>|  Computer Support Person              |  Phone  (071)562889 xt 8181        |
>|  Computer Science Department          |  Amiga 3000 for ME!                |
>|  University of Waikato                |                                    |
>==============================================================================
>|Disclaimer:  Anything said in this message is the personal opinion of the   |
>|             finger hitting the keyboard & doesn't represent my employers   |
>|             opinion in any way. (ie we probably don't agree)               |
>==============================================================================



--
##########################################################
#   Michael Jansson             |   \_/
#   Internet: mij@IDA.LIU.SE    |    V                   _|_
#   UUCP: uunet!liuida!mij      |    |    Absolut Software|
#   BITNET: mij@SELIUIDA        |   ~~~