Special:
|
[DAT] (requires LDraw-compatible viewer)
|
Subject:
|
New primitive: chord.dat (not the final name)
|
Newsgroups:
|
lugnet.cad.dat.parts, lugnet.cad.dev
|
Date:
|
Tue, 17 Dec 2002 01:31:27 GMT
|
Viewed:
|
69 times
|
| |
| |
Here's something I whipped up that I find extremely useful for patterned
parts in particular. When trying to put something inside a circle (or
anywhere near a curved section), this lets you avoid 2 problems:
1: having to calculate the awkward intercept points of a
line intersecting the surrounding segmented circle
2: the gap problem associated with doing so and then rendering
it in POV-Ray
Sure, you only recover 50% of the surrounding square's area (~= 64% of the
disc's area)- but that's enough to do a lot.
It's a 90-degree "segment": the region between a subarc and a chord. I
adapted the code from a quarter disc (by moving the 0,0,0 points to .5,0,.5)
and added conditional .POV code so that it comes out smoothly.
Here's an image that shows what I'm talking about:
http://www.hafhead.com/temp/segment.jpg
--
Tony Hafner
www.hafhead.com
0 Chord
0 Name: p\chord.dat
0 Author: Tony Hafner <www.hafhead.com>
0 Adapted from 1-4disc.dat by James Jessiman
0 Unofficial primitive
0 BFC CERTIFY CCW
0 L3P IFNOTPOV
3 16 0.5 0 0.5 1 0 0 0.9239 0 0.3827
3 16 0.5 0 0.5 0.9239 0 0.3827 0.7071 0 0.7071
3 16 0.5 0 0.5 0.7071 0 0.7071 0.3827 0 0.9239
3 16 0.5 0 0.5 0.3827 0 0.9239 0 0 1
0 L3P ELSEPOV
0 object{disc{<0,0,0> <0,1,0> 1 clipped_by {
0 plane {<-1,0,0> 0} rotate <0,-45,0> translate<1,0,0>}}}
0 L3P ENDPOV
0
|
|
Message has 1 Reply:
3 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|