## Disk(5,3).nom # # A pentafoil placed in a disk. -- A tutorial example. # ## CHS 2018/5/12 #### Some Surface colors ##### surface Z color (1 0 0.5) endsurface # Zinnober surface R color (1 0 0) endsurface # Red surface O color (0.9 0.6 0) endsurface # Orange surface Y color (1 1 0) endsurface # Yellow surface L color (0.6 0.8 0) endsurface # Lime surface G color (0 0.9 0) endsurface # Green surface A color (0 0.9 0.7) endsurface # Aqua surface C color (0 1 1) endsurface # Cyan surface U color (0 0.5 1) endsurface # Uniform surface B color (0 0 1) endsurface # Blue surface P color (0.5 0 1) endsurface # Purple surface M color (1 0 1) endsurface # Magenta surface W color (1 1 1) endsurface # White surface S color (0.8 0.8 0.8) endsurface # Snow(dirty) #### Display settings ##### background surface S endbackground foreground surface O endforeground insidefaces surface U endinsidefaces outsidefaces surface C endoutsidefaces offsetfaces surface M endoffsetfaces ################################################################################## subdivision subdiv type SLF_CATMULL_CLARK subdivisions 5 endsubdivision offset thickened type WEIGHTED min 0.0 max 2.0 step 0.01 endoffset ################################################################################## bank p ## all paramaeters set rimnum 55 1 20 5 # number of segments set rimrad 6 2 20 0.1 # rim circle radius set rimrot 0 -60 60 1 # rotate outer circle set prad 5.3 1 20 0.1 # pentafoil.radius set irad 2 1 20 0.1 # pentafoil.inner ctrl pts radius set psep 20 0 30 1 # pentafoil.sep.angle set ptik 2.5 -5 5 0.1 # pentafoil.zthick set pseg 90 15 90 5 # pentafoil.segments endbank circle circ ({expr $p.rimnum} {expr $p.rimrad} ) endcircle instance co circ rotate (0 0 1)( {expr $p.rimrot} ) surface R endinstance point center ( 0 0 0) endpoint point b0 ( {expr $p.prad*cos(0.0174533*( $p.psep))} {expr $p.prad*sin(0.0174533*( $p.psep))} {expr $p.ptik} ) endpoint point i0 ( {expr $p.irad*cos(0.0174533*( 108))} {expr $p.irad*sin(0.0174533*( 108))} 0 ) endpoint point b1 ( {expr $p.prad*cos(0.0174533*(-$p.psep+216))} {expr $p.prad*sin(0.0174533*(-$p.psep+216))} {expr -$p.ptik} ) endpoint point b2 ( {expr $p.prad*cos(0.0174533*( $p.psep+216))} {expr $p.prad*sin(0.0174533*( $p.psep+216))} {expr $p.ptik} ) endpoint point i2 ( {expr $p.irad*cos(0.0174533*( -36))} {expr $p.irad*sin(0.0174533*( -36))} 0 ) endpoint point b3 ( {expr $p.prad*cos(0.0174533*(-$p.psep+72))} {expr $p.prad*sin(0.0174533*(-$p.psep+72))} {expr -$p.ptik} ) endpoint point b4 ( {expr $p.prad*cos(0.0174533*( $p.psep+72))} {expr $p.prad*sin(0.0174533*( $p.psep+72))} {expr $p.ptik} ) endpoint point i4 ( {expr $p.irad*cos(0.0174533*( 180))} {expr $p.irad*sin(0.0174533*( 180))} 0 ) endpoint point b5 ( {expr $p.prad*cos(0.0174533*(-$p.psep+288))} {expr $p.prad*sin(0.0174533*(-$p.psep+288))} {expr -$p.ptik} ) endpoint point b6 ( {expr $p.prad*cos(0.0174533*( $p.psep+288))} {expr $p.prad*sin(0.0174533*( $p.psep+288))} {expr $p.ptik} ) endpoint point i6 ( {expr $p.irad*cos(0.0174533*( 36))} {expr $p.irad*sin(0.0174533*( 36))} 0 ) endpoint point b7 ( {expr $p.prad*cos(0.0174533*(-$p.psep+144))} {expr $p.prad*sin(0.0174533*(-$p.psep+144))} {expr -$p.ptik} ) endpoint point b8 ( {expr $p.prad*cos(0.0174533*( $p.psep+144))} {expr $p.prad*sin(0.0174533*( $p.psep+144))} {expr $p.ptik} ) endpoint point i8 ( {expr $p.irad*cos(0.0174533*( -108))} {expr $p.irad*sin(0.0174533*( -108))} 0 ) endpoint point b9 ( {expr $p.prad*cos(0.0174533*(-$p.psep))} {expr $p.prad*sin(0.0174533*(-$p.psep))} {expr -$p.ptik} ) endpoint bspline4 bsp ( b0 i0 b1 b2 i2 b3 b4 i4 b5 b6 i6 b7 b8 i8 b9 ) closed slices {expr $p.pseg} endbspline4 instance pfoil bsp surface O endinstance mesh cross face f0 (.pfoil.v86 .pfoil.v87 .pfoil.v21 .pfoil.v22 ) endface face f1 (.pfoil.v87 .pfoil.v88 .pfoil.v20 .pfoil.v21 ) endface face f2 (.pfoil.v88 .pfoil.v89 .pfoil.v55 .pfoil.v54 ) endface face f3 (.pfoil.v54 .pfoil.v53 .pfoil.v19 .pfoil.v20 ) endface face f4 (.pfoil.v20 .pfoil.v88 .pfoil.v54 ) endface endmesh instance mC cross surface C reverse endinstance instance mY cross surface Y reverse rotate(0 0 1)( 72) endinstance instance mO cross surface O reverse rotate(0 0 1)(144) endinstance instance mR cross surface R reverse rotate(0 0 1)(216) endinstance instance mM cross surface M reverse rotate(0 0 1)(288) endinstance mesh skirt face f0 (.co.v0 .co.v1 .pfoil.v82 .pfoil.v81 ) endface face f1 (.co.v1 .co.v2 .pfoil.v83 .pfoil.v82 ) endface face f2 (.co.v2 .co.v3 .pfoil.v84 .pfoil.v83 ) endface face f3 (.co.v3 .co.v4 .pfoil.v85 .pfoil.v84 ) endface face f4 (.co.v4 .co.v5 .pfoil.v86 .pfoil.v85 ) endface face f5 (.co.v5 .co.v6 .pfoil.v22 .pfoil.v86 ) endface face f6 (.co.v6 .co.v7 .pfoil.v23 .pfoil.v22 ) endface face f7 (.co.v7 .co.v8 .pfoil.v24 .pfoil.v23 ) endface face f8 (.co.v8 .co.v9 .pfoil.v25 .pfoil.v24 ) endface face f9 (.co.v9 .co.v10 .pfoil.v26 .pfoil.v25 ) endface face f10 (.co.v10 .co.v11 .pfoil.v27 .pfoil.v26 ) endface endmesh instance sC skirt surface C endinstance instance sY skirt surface Y rotate(0 0 1)( 72) endinstance instance sO skirt surface O rotate(0 0 1)(144) endinstance instance sR skirt surface R rotate(0 0 1)(216) endinstance instance sM skirt surface M rotate(0 0 1)(288) endinstance