Page 1 of 1
Diagonal and rectangle shapes
Posted: Fri Jul 08, 2005 12:55 am
by BigFresh
Okay, I saw this program on Attack of the Show on G4TV, and I decided to give it a try.
My questions are this: How do I draw a solid diagonal line (so it's not "pixelated")? Also, Is it possible to draw a rectangle with a single square command, or do I have to use multiple square commands?
Thank you in advance.
Posted: Fri Jul 08, 2005 1:25 am
by LaT3x
Hello.
At the moment, there aren't a unique SQUARE command to generate a rectangle. You must to do it. Chris is waiting for somebody to do it
[
http://www.chriscoyne.com/cfdgforums/viewtopic.php?t=15 ]
Example of rectangle:
Code: Select all
rule rectangle2by6{
SQUARE {size 2 x -2}
SQUARE {size 2 x}
SQUARE {size 2 x 2}
}
rule rectangle6by2 {
rectangle2by6 {rotate 180}
}
rule rectangle12by4 {
rectangle2by6 {size 2}
}
About the "perfect" diagonal, you must to create a line, rectangle or any figure and next, rotate this to get it. Example:
Code: Select all
startshape diagonal
rule diagonal {
line { r 5 }
line { x 10 r 25 }
line { x 20 r 45 }
}
rule line {
SQUARE{}
SQUARE { x 1}
SQUARE { x 2}
SQUARE { x 3}
SQUARE { x 4}
SQUARE { x 5}
SQUARE { x 6}
// ... recursion ...
}
Good luck
(Sorry about my poor english
)
Posted: Fri Jul 08, 2005 8:33 am
by MtnViewJohn
In version 1.1 (due any day now) you can have aspect ratio control:
Code: Select all
rule rectangle2by6{
SQUARE {size 2 6}
}
rule rectangle6by2 {
SQUARE {size 6 2}
}
rule rectangle12by4 {
SQUARE {size 12 4}
}
I have some ideas for line primitives but they won't be in v1.1.
Posted: Fri Jul 08, 2005 8:21 pm
by BigFresh
Thanks a bunch! I got my shape worked out perfectly!