Those darned broken lines again!
Here it is a little skinnier.
%!
{vrad n poly crad n rotsubpolyrotdraw } %rot polys on the rot poly
{vrad circ } %defining circle
{vrad n poly draw } %defining polygon
{vrad n poly drawperp } %draw perpendiculars to def poly
{vrad crad add n poly drawperp } %draw perps to diagram edges
{vrad crad add n poly drawrotperp } %draw rotated perps to edges
{vrad crad 2 div add n poly draw } %Rv+Rc/2 centered poly
{crad n poly draw } %cell-radius centered poly
{vrad crad .5 mul add n poly draw } %enlarged def poly
{vrad crad .25 mul sub n poly draw } %reduced def poly
{vrad 2 1 n div sub mul n poly draw } %weightedly enlarged def poly
%rotated defining polygon
{gsave 180 rotate vrad n poly draw grestore }
That's beautiful, well done :-)
Regards, Peter
--
Peter Billam www.pjb.com.au www.pjb.com.au/comp/contact.html
-2 vmreclaim %disable all garbage collection
". But when I try to use my new subcircle radius calculation,
Cairo spazzes out with ... oh, it isn't doing it now. Weird.
Well I was getting an Error Matrix Not Invertible or something
to that effect. But the program isn't using itransform or even
currentpoint. Oh well, I guess it's an outstanding bug.
But back to the good part. Speed. Raw, blinding speed!
If you've got xpost, you can see for yourself. After n=11,
ghostscript (in *my* installation, which is not at all current)
shows a noticeable delay after drawing 2 of the 4 diagrams,
and on subsequent pages, it just get more and more excruciating
(partly because the images get less interesting, too).
But thanks to xpost's horrible user interface, most of the
drawing time elapses while I'm moving the pointer back and
forth between the output window and the input window. :)
I don't dare test xpost/Cairo's pdf output of this file.
In my brief experience Cairo/pdf files are hugely enormous
for no apparent reason (perhaps I should look into upgrading
my software?! :) )
Well, thanks for listening, we'll talk more soon.
I solved this problem! It was in the calculation for the
"subcircle radius" for n=1. The radius is defined as the
distance between opposite points on the defining polygon,
but for n=1, there's only one point; so the distance between
it and itself is Zero. Then we try to scale by that amount.
kablooey! But ghostscript never complained; it willingly
placed all user-points on the same device point while
that matrix was in effect.
> But back to the good part. Speed. Raw, blinding speed!
> If you've got xpost, you can see for yourself. After n=11,
> ghostscript (in *my* installation, which is not at all current)
> shows a noticeable delay after drawing 2 of the 4 diagrams,
> and on subsequent pages, it just get more and more excruciating
> (partly because the images get less interesting, too).
>
> But thanks to xpost's horrible user interface, most of the
> drawing time elapses while I'm moving the pointer back and
> forth between the output window and the input window. :)
I solved this problem, too. I borrowed a few lines from
ghostscript:
{
XWMHints wm_hints;
wm_hints.flags = InputHint;
wm_hints.input = False;
XSetWMHints(st->dis, st->win, &wm_hints);
}
But xpost is doing some crazy stuff with the complicated
even-odd fills. ghostscript takes a long time with these,
but there are no detectable cracks in the symmetry.
I'll choose a really gnarly picture and post it.
I suspect it has to do with floating-point round-off.
Also, the ve6.ps code has gotten really long and complicated
again, so I'm going to print it out and retype it before posting
(this inevitably simplifies the code, because I get bored typing
anything unduly repetitive).