1# numeric-property 2 3There are really only four numeric properties: 4 5 * width 6 * height 7 * radius 8 * thickness 9 10The width and height are the size of most objects. The radius is used 11to set the size of circles. The thickness value is the width of lines used to 12draw each object. The other property names are just aliases for these 13four: 14 15 * wid → an abbreviation for "width" 16 * ht → an abbreviation for "height" 17 * rad → an abbreviation for "radius" 18 * diameter → twice the radius 19 20## Radius Of A "box" Object 21 22By default, boxes have a radius of 0. But if you assign a positive 23radius to a box, it causes the box to have rounded corners: 24 25~~~~~ pikchr center 26box "radius 0" 27move 28box "radius 5px" rad 5px 29move 30box "radius 20px" rad 20px 31~~~~~ 32 33## Dimensions Of A "circle" Object 34 35If you change any of the "width", "height", "radius", or "diameter" of 36a circle, the other three values are set automatically. 37 38## Radius Of A "cylinder" Object 39 40The "radius" of a "cylinder" object is the semiminor axis of the ellipse 41that forms the top of the "cylinder". 42 43~~~~~ pikchr center 44C: cylinder 45line thin left from C.nw - (2mm,0) 46line thin left from C.nw - (2mm,C.radius) 47arrow <- from 3/4<first line.start,first line.end> up 30% 48arrow <- from 3/4<2nd line.start,2nd line.end> down 30% 49text "radius" above at end of 1st arrow 50~~~~~ 51 52Some examples: 53 54~~~~~ pikchr center 55cylinder "radius 50%" rad 50% 56move 57cylinder "radius 100%" rad 100% 58move 59cylinder "radius 200%" "height 200%" rad 200% ht 200% 60~~~~~ 61 62 63## Radius Of A "file" 64 65For a "file" object, the radius is the amount by which the upper right 66corner is folded over. 67 68~~~~~ pikchr center 69F: file 70line thin from 2mm right of (F.e,F.n) right 75% 71line thin from F.rad below start of previous right 75% 72arrow <- from 3/4<first line.start,first line.end> up 30% 73arrow <- from 3/4<2nd line.start,2nd line.end> down 30% 74text "radius" above at end of 1st arrow 75~~~~~ 76 77## Radius Of A "line" 78 79Setting a radius on a line causes the corners to be rounded by that 80amount. 81 82~~~~~ pikchr center 83line go 2cm heading 40 then 4cm heading 165 then 1cm heading 280\ 84 "radius" "0" 85move to 3cm right of previous.start 86line same "radius" "15px" rad 15px 87move to 3cm right of previous.start 88line same "radius" "30px" rad 30px 89~~~~~ 90