🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #7760

Re: Perpendicular Lines (Clarification)

#7760
From: Geof Cooper
Date: Thu, 22 Dec 1988 02:41
28 lines
1133 bytes
In article <723@optilink.UUCP> cramer@optilink.UUCP (Clayton Cramer) writes:
>I would like to draw a circle, and lines which are perpendicular to lines
>tangent to the circle (much like the lines on a clock face).  I would 
>also like to print text whose base line is parallel to the tangent lines.

Here is some untested code.

Let cx, cy be the center of the circle.
Let r be its radius
Let theta be the angle around the circle at which you'd like
  to draw one of your radial lines or print text tangent
  to the circle

% Align X axis with circle
cx cy translate
theta rotate

% Move to perimeter of circle
r 0 translate

% Draw the line where you want it
-10 0 moveto 0 0 lineto stroke

% Rotate to put text tangent to the circle
% (if you speak hebrew, negate the angle!)
-90 rotate

(This text is tangent) show
Technical Details
Message-ID: <2819@imagen.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!seismo!sundc!pitstop!sun!imagen!daemon

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!seismo!sundc!pitstop!sun!imagen!daemon
From: geof@apolling (Geof Cooper)
Newsgroups: comp.lang.postscript
Subject: Re: Perpendicular Lines (Clarification)
Message-ID: <2819@imagen.UUCP>
Date: 22 Dec 88 02:41:53 GMT
Sender: daemon@imagen.UUCP
Lines: 28