Path: csiph.com!feeder.erje.net!1.us.feeder.erje.net!bloom-beacon.mit.edu!bloom-beacon.mit.edu!panix!panix.com!forkosh From: JohnF Newsgroups: comp.lang.postscript Subject: Re: a smooth curve through given points ? Date: Tue, 16 Aug 2016 01:28:45 +0000 (UTC) Organization: PANIX Public Access Internet and UNIX, NYC Lines: 55 Message-ID: References: <3243f726-6885-4ae2-aac9-f8834261dc73@googlegroups.com> NNTP-Posting-Host: panix3.panix.com X-Trace: reader2.panix.com 1471310925 12297 166.84.1.3 (16 Aug 2016 01:28:45 GMT) X-Complaints-To: abuse@panix.com NNTP-Posting-Date: Tue, 16 Aug 2016 01:28:45 +0000 (UTC) User-Agent: tin/1.6.2-20030910 ("Pabbay") (UNIX) (NetBSD/6.1.5 (i386)) Xref: csiph.com comp.lang.postscript:2776 Peter Billam wrote: > On 2016-08-15, John Forkosh wrote: >> Very nice. I tested it with various other x,y1...x,yn's, >> and it seems to behave pretty nicely for the stuff I tested. > > I found a bit of a problem when I tried > [ 250 300 240 400 260 390 250 600 ] points2curve stroke > in other words with a short segment at an acute angle (around p4); > I decided that in order to calculate p3 and p5 it's safer to > scale with the _shorter_ of the two segments. So when I wrote that: > and I think if p1-to-p4 is a long segment and p4-to-p7 is a short > one, then it probably looks better if p3-to-p4 is reasonable in the > p1-to-p4 context, and p4-to-p5 reasonable in its p4-to-p7 context. > Needs trying out > well I tried it, and it turned out luser.droog was right :-) > So anyway, the currently quite useable version is rolled into > http://www.pjb.com.au/comp/line_drawing.html#points2curve > as planned, and you can get it in > http://www.pjb.com.au/comp/free/line_drawing.ps.txt > or in github: > https://github.com/peterbillam/postscriptlib > but I can also post the new procedure here if people want ... > I'll road-test it a bit over the next few days. Thanks. I guess I didn't test it thoroughly (and wasn't really sure where the "rough edges" that I'd want to thoroughly test are). Please do re-post when you're satisfied with it (not necessarily the procedure itself, but just the fact it's "ready for prime time"). Some of my "arty stuff" also does bezier, e.g., http://www.forkosh.com/images/decorative/decorative8.jpg and the corresponding .ps, which shows the /curvestep function. I was thinking of maybe adding another such function based on your points2curve, though at the moment I don't have any designs in mind that would use it. >> Like you, I put together some ps for "arty stuff" (your >> words above), and you might find some of that useful. See >> http://www.forkosh.com/images/decorative/decorative13.jpg >> for an example. Same_directory/decorative13.ps has all the ps. > > Very nice :-) With that kind of image, I always dream about > gradually changing the parameters, generating hundreds of them > (maybe 1600x900) and putting them together into a movie ! > (thinks: fame, fortune) but I never get around to it, though. > Peter Yeah, check out http://www.forkosh.com/images/decorative/decofweek.gif and the corresponding .ps file. That's an animated gif design. I used imagemagick convert whatever.ps whatever.gif to do that. Each %%Page: ... showpage of the .ps gets interpreted as a separate frame of the gif animation. Not exactly a movie, but maybe accomplishes some of what you might be thinking. -- John Forkosh ( mailto: j@f.com where j=john and f=forkosh )