Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #135659
| From | Hans Bezemer <the.beez.speaks@gmail.com> |
|---|---|
| Newsgroups | comp.lang.forth |
| Subject | Re: General routine for a polyline or a polygon |
| Date | 2026-09-11 13:30 +0200 |
| Organization | A noiseless patient Spider |
| Message-ID | <1180oon$2refu$1@dont-email.me> (permalink) |
| References | <117u1p9$1toc3$1@dont-email.me> <6aa2b1a4$1@news.ausics.net> <117uovt$26cqd$1@dont-email.me> |
On 10-09-2026 19:22, Hans Bezemer wrote:
In my enthusiasm I had completely overlooked that 4tH is 32/64-bit and
DX-Forth is 16-bit. I tried arc-circles, bezier curves -- I never even
tried ellipses, because these require double words in 32-bit 4tH to
begin with, so -- no chance of winning.
But! At least you now got circles as well ;-) (Yeah, I tried!)
Hans Bezemer
---8<---
: circle ( x y radius --)
swap >r swap >r 1 over - swap 0 ( dp x y R: x0 y0)
begin
over r@ + over r> r@ swap >r + color point ( x0 + x,
y0 + y)
over r@ swap - over r> r@ swap >r + color point ( x0 - x,
y0 + y)
over r@ + over r> r@ swap >r swap - color point ( x0 + x,
y0 - y)
over r@ swap - over r> r@ swap >r swap - color point ( x0 - x,
y0 - y)
over r> r@ swap >r + over r@ + swap color point ( x0 + y,
y0 + x)
over r> r@ swap >r + over r@ swap - swap color point ( x0 - y,
y0 + x)
over r> r@ swap >r swap - over r@ + swap color point ( x0 + y,
y0 - x)
over r> r@ swap >r swap - over r@ swap - swap color point ( x0 - y,
y0 - x)
( dp x y R: x0 y0)
1+ >r over 0> if 1- r@ over - else r@ then 2* 1+ rot + swap r>
over over < ( dp x y f R: x0 y0)
until drop drop drop r> drop r> drop
;
---8<---
Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
General routine for a polyline or a polygon Hans Bezemer <the.beez.speaks@gmail.com> - 2026-09-10 12:46 +0200
Re: General routine for a polyline or a polygon dxf <dxforth@gmail.com> - 2026-09-10 23:33 +1000
Re: General routine for a polyline or a polygon Hans Bezemer <the.beez.speaks@gmail.com> - 2026-09-10 19:22 +0200
Re: General routine for a polyline or a polygon Hans Bezemer <the.beez.speaks@gmail.com> - 2026-09-11 13:30 +0200
Re: General routine for a polyline or a polygon dxf <dxforth@gmail.com> - 2026-09-12 01:04 +1000
Re: General routine for a polyline or a polygon dxf <dxforth@gmail.com> - 2026-09-12 02:34 +1000
Re: General routine for a polyline or a polygon Hans Bezemer <the.beez.speaks@gmail.com> - 2026-09-11 19:22 +0200
csiph-web