[comp.sys.amiga.tech] Rotating Rectangles, was

richard@gryphon.CTS.COM (Richard Sexton) (05/19/88)

In article <YWYRI-y00VAAA-Dlgc@andrew.cmu.edu> mp1u+@andrew.cmu.edu (Michael Portuesi) writes:
>Richard Sexton expresses the following question:
>>
>> Huh ?
>
>Imagine you have a rectangle defined by its top/left and bottom/right
>corner points:
>
>	    +------
>	    |     |
>	    ------+
>
>You rotate an object by rotating its points:
>
>		   /\
>	          /  +
>		 /  /
>		+  /
>		 \/
>

Hmm. Okay. You are rotating all four points to generate the rotated rectangle.

I still maintain that rectangles are most efficiantly represented with
top left and bottom right points. It saves space in the display list and
saves transmission time to a rendering host, if there is one.

If you can compute the rotated points, shirley you can compute the "missing"
vertices.

If you cant, write me, I think I have the algorithm somewhere.......


-- 
           Have a nice day or Klortho will rip your nuts off.
richard@gryphon.CTS.COM                          rutgers!marque!gryphon!richard

richard@gryphon.CTS.COM (Richard Sexton) (05/22/88)

(Ross Cunniff) writes:
>
>That would be an interesting algorithm indeed; I've always wondered if
>anybody was working on psychic software :-).  Seriously, two points do
>not suffice if rectangles may be rotated.  How can the software tell the
>difference between these two rectangles:
>
>			 /\
>	+-----		+  \
>	|    |		 \  \	(pretend the second one has all right angles)
>	-----+		  \  +
>			   \/

Oh. I thought you were rotating them after the fact, not rendering rotated
rectangles. Never mind.

I still say they're polygons, not rectangles :-)


-- 
           Have a nice day or Klortho will rip your nuts off.
richard@gryphon.CTS.COM                          rutgers!marque!gryphon!richard