Post Reply 
(50g) Bolt Pattern
04-10-2015, 05:04 AM (This post was last modified: 06-15-2017 01:32 PM by Gene.)
Post: #1
(50g) Bolt Pattern
Bolt Pattern: BOLTPAT

Link to the original blog entry: http://edspi31415.blogspot.com/2015/03/h...ttern.html


Input:
4: xc: x coordinate, center
3: yc: y coordinate, center
2: n: number of bolts
1: d: diameter of the circle

Program:
<< DEG OVER 1 – → xc yc n d k
<< { } 0 k FOR I 360 I * n / DUP COS d 2 / * xc +
SWAP SIN d 2 / * yc + (0,1) * + + NEXT
DUPDUP 2 GET SWAP 1 GET – ABS >> >>

Output:
2: list of bolts (x+yi)
1: OC-Distance
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)