Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.postscript > #2004
| Newsgroups | comp.lang.postscript |
|---|---|
| Date | 2014-09-02 02:06 -0700 |
| References | <0410d6f7-a91f-4b56-a0f6-fd7f558676cd@googlegroups.com> <f791cdde-84ed-484d-9f52-a242a52dca97@googlegroups.com> <6d617280-6964-4601-91c9-8600fa370bbe@googlegroups.com> |
| Message-ID | <608ec2aa-687e-4fc2-b96c-030d9399bc12@googlegroups.com> (permalink) |
| Subject | Re: setdash |
| From | jdaw1 <jdawiseman@gmail.com> |
I think you might need something like this.
% x0 y0 x1 y1 x2 y2 x3 y3 WantedDistance Tolerance FindDistanceInCurve real bool
% If the bool is true, the real is the t value within cure
% if the bool is false, the real is the length of the whole curve
/FindDistanceInCurve
{
...
} bind def % /FindDistanceInCurve
Obviously lots missing. It will use a variation of the splitting algorithm in http://steve.hollasch.net/cgindex/curves/cbezarclen.html
If within Tolerance of a straight line, then use the approximation in the linked article to compute estimated length. If length <= WantedDistance, return false and that length. Otherwise split curve. Repeat on first segment with Tolerance halved: if t found, then good. Obviously t's will need to be mapped from the sub-range into the whole. If t not found, subtract new-found length from target and repeat on second curve.
Back to comp.lang.postscript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
setdash luser- -droog <mijoryx@yahoo.com> - 2014-08-30 01:43 -0700
Re: setdash jdaw1 <jdawiseman@gmail.com> - 2014-08-30 02:51 -0700
Re: setdash luser- -droog <mijoryx@yahoo.com> - 2014-08-30 20:40 -0700
Re: setdash jdaw1 <jdawiseman@gmail.com> - 2014-09-01 02:39 -0700
Re: setdash jdaw1 <jdawiseman@gmail.com> - 2014-09-02 02:06 -0700
Re: setdash luser- -droog <mijoryx@yahoo.com> - 2014-09-04 16:51 -0700
Re: setdash luser- -droog <mijoryx@yahoo.com> - 2014-09-16 03:37 -0700
Re: setdash luser- -droog <mijoryx@yahoo.com> - 2014-11-16 23:40 -0800
csiph-web