Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.postscript > #3436
| Newsgroups | comp.lang.postscript |
|---|---|
| Date | 2019-08-19 22:46 -0700 |
| References | (5 earlier) <1b955bab-1d49-4739-adf1-88c02606af56@googlegroups.com> <5d20eeef-c249-4765-b5b4-b3dcdceee704@googlegroups.com> <45fef125-5d35-4535-8380-8eab9294e449@googlegroups.com> <098c541d-5c74-40c5-9865-0bd028aee3aa@googlegroups.com> <395bcb26-aab8-46e4-9173-e28c8fc1af98@googlegroups.com> |
| Message-ID | <855120c4-7bbc-4fd4-97fa-816114d6f2b7@googlegroups.com> (permalink) |
| Subject | Re: Snipping the ears |
| From | luser droog <luser.droog@gmail.com> |
On Tuesday, August 13, 2019 at 6:03:58 PM UTC-5, luser droog wrote: > Mostly there. Everything works. Ear detection seems to be working just > by checking two vectors from each curve, the "control vector" that goes > from the first control point to the second, and the "transit vector" > that goes straight from the first point to the final point. If the > control vector is bigger than the transit vector, that's an "inverted > curve" by my definition. And if the angular difference between the > control vector and the transit vector is more than about 80 degrees, > then that's either a thorny triangle or a twisted curve if it's even > bigger, closer to 180 degrees. > > When drawing an offset curve 10 points away, I get 2 ears which matches > the visual results. At 5 points away, I get this "ear report": > > [(00000000000000011000000000000000000000000) (000000000000000)] > > which matches the visual results. At only 2 points away, no ears are > found, which also looks right. > > So, now for the chore of actually snipping the ears. I think the same > PostScript trick of using a dict as an associative array will help. > I can associate each string of the ear report with the subpath array > it belongs to. Then I can use a plain 'forall' loop instead of a weird > 'for' loop to access parallel arrays. > > I expect to have some pretty output soon. Wish me luck! > Sigh. Same story again. It all works, but it doesn't "work". I tried snipping the ears by replacing the subsequence of curves with a single curve. And I tried grabbing earlier and/or later curves as well. I think it might work if I use 2 curves. I have a sketch of how to do it, but nothing typed in yet.
Back to comp.lang.postscript | Previous | Next — Previous in thread | Next in thread | Find similar
Snipping the ears luser droog <luser.droog@gmail.com> - 2019-07-20 13:18 -0700
Re: Snipping the ears luser droog <luser.droog@gmail.com> - 2019-07-20 16:51 -0700
Re: Snipping the ears luser droog <luser.droog@gmail.com> - 2019-07-22 00:47 -0700
Re: Snipping the ears luser droog <luser.droog@gmail.com> - 2019-07-24 00:38 -0700
Re: Snipping the ears Mark Carroll <mtbc@bcs.org> - 2019-07-24 08:50 +0100
Re: Snipping the ears luser droog <luser.droog@gmail.com> - 2019-07-29 23:18 -0700
Re: Snipping the ears luser droog <luser.droog@gmail.com> - 2019-08-06 22:05 -0700
Re: Snipping the ears luser droog <luser.droog@gmail.com> - 2019-08-08 00:22 -0700
Re: Snipping the ears luser droog <luser.droog@gmail.com> - 2019-08-11 13:33 -0700
Re: Snipping the ears luser droog <luser.droog@gmail.com> - 2019-08-13 16:03 -0700
Re: Snipping the ears luser droog <luser.droog@gmail.com> - 2019-08-19 22:46 -0700
Re: Snipping the ears luser droog <luser.droog@gmail.com> - 2019-08-21 23:44 -0700
Re: Snipping the ears jdaw1 <jdawiseman@gmail.com> - 2019-10-10 15:07 -0700
Re: Snipping the ears jdaw1 <jdawiseman@gmail.com> - 2019-10-10 15:09 -0700
Re: Snipping the ears luser droog <luser.droog@gmail.com> - 2019-10-13 01:39 -0700
Re: Snipping the ears luser droog <luser.droog@gmail.com> - 2019-10-13 01:51 -0700
Re: Snipping the ears jdaw1 <jdawiseman@gmail.com> - 2020-06-04 03:15 -0700
Re: Snipping the ears luser droog <luser.droog@gmail.com> - 2020-07-09 10:31 -0700
Re: Snipping the ears jdaw1 <jdawiseman@gmail.com> - 2021-02-13 09:51 -0800
csiph-web