<s> from visual import * <EOL> scene . range = <NUM_LIT:4> <EOL> scene . forward = ( - <NUM_LIT> , <NUM_LIT> , - <NUM_LIT> ) <EOL> scene . width = scene . height = <NUM_LIT> <EOL> scene . autocenter = True <EOL> def pstar ( pos = ( <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> ) , np = <NUM_LIT:8> , radius = <NUM_LIT> , length = <NUM_LIT> ) : <EOL> st = shapes . triangle ( length = length ) <EOL> stf = frame ( pos = pos ) <EOL> est = extrusion ( frame = stf , pos = paths . star ( n = np , radius = radius ) , shape = st ) <EOL> stf . rotate ( angle = pi / <NUM_LIT:2> ) <EOL> return est <EOL> def column ( pos = ( <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> ) , height = <NUM_LIT> , rotate = <NUM_LIT:0.0> ) : <EOL> column = frame ( pos = pos ) <EOL> col_body = shapes . ngon ( radius = <NUM_LIT> , np = <NUM_LIT:16> , roundness = <NUM_LIT:0.0> , invert = True ) <EOL> cbe = extrusion ( frame = column , pos = [ ( <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> ) , ( <NUM_LIT:0> , height , <NUM_LIT:0> ) ] , shape = col_body , <EOL> scale = [ ( <NUM_LIT:1> , <NUM_LIT:1> ) , ( <NUM_LIT> , <NUM_LIT> ) ] ) <EOL> chs = shapes . rectangle ( width = <NUM_LIT> ) <EOL> chr = shapes . ellipse ( width = <NUM_LIT> , height = <NUM_LIT> ) <EOL> cha = shapes . circle ( pos = ( <NUM_LIT> , <NUM_LIT> ) , radius = <NUM_LIT> ) <EOL> ch = chs - cha <EOL> che = extrusion ( frame = column , pos = paths . circle ( radius = <NUM_LIT> ) , shape = ch ) <EOL> cbase = cylinder ( frame = column , pos = ( <NUM_LIT:0> , - <NUM_LIT> , <NUM_LIT:0> ) , radius = <NUM_LIT> , <EOL> axis = ( <NUM_LIT:0> , height / <NUM_LIT> , <NUM_LIT:0> ) ) <EOL> fr1 = frame ( frame = column , pos = ( <NUM_LIT:0> , - <NUM_LIT> , <NUM_LIT:0> ) ) <EOL> cbr1 = extrusion ( frame = fr1 , pos = paths . circle ( radius = <NUM_LIT> ) , shape = cha ) <EOL> fr2 = frame ( frame = column , pos = ( <NUM_LIT:0> , - <NUM_LIT> , <NUM_LIT:0> ) ) <EOL> cbr2 = extrusion ( frame = fr2 , pos = paths . circle ( radius = <NUM_LIT> ) , shape = cha ) <EOL> cbd = shapes . rectangle ( width = <NUM_LIT> , height = <NUM_LIT> , roundness = <NUM_LIT:0.1> , invert = True ) <EOL> cbf = frame ( frame = column , pos = ( <NUM_LIT:0> , - <NUM_LIT> , <NUM_LIT:0> ) ) <EOL> cbde = extrusion ( frame = cbf , pos = [ ( <NUM_LIT:0> , <NUM_LIT:0> , - <NUM_LIT> ) , ( <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT> ) ] , shape = cbd ) <EOL> cbs = extrusion ( frame = column , pos = [ ( <NUM_LIT:0> , - <NUM_LIT> , <NUM_LIT> ) , ( <NUM_LIT:0> , - <NUM_LIT> , <NUM_LIT> ) ] , <EOL> scale = [ ( <NUM_LIT:0.5> , <NUM_LIT:0.5> ) , ( <NUM_LIT:0.5> , <NUM_LIT:0.5> ) ] , shape = "<STR_LIT:*>" ) <EOL> cbf . rotate ( angle = pi / <NUM_LIT:2> ) <EOL> def spiral ( nloop = <NUM_LIT:1> , tightness = <NUM_LIT:1.0> , dir = <NUM_LIT:1.0> , scale = <NUM_LIT:1.0> ) : <EOL> spr = [ ] <EOL> for t in range ( <NUM_LIT:1> , <NUM_LIT> * nloop , <NUM_LIT:16> ) : <EOL> t *= <NUM_LIT> <EOL> x = tightness / <NUM_LIT> * t * math . cos ( t ) * dir * scale <EOL> y = tightness / <NUM_LIT> * t * math . sin ( t ) * scale <EOL> spr . append ( ( x , y ) ) <EOL> return spr <EOL> spiral = spiral ( nloop = <NUM_LIT:1> , tightness = <NUM_LIT:1.0> , dir = <NUM_LIT:1.0> , scale = <NUM_LIT> ) <EOL> deltax = <NUM_LIT:0.0> <EOL> deltay = - <NUM_LIT> <EOL> srevrs = [ ] <EOL> srevrs . extend ( spiral ) <EOL> srevrs . reverse ( ) <EOL> for sp in srevrs : <EOL> spiral . append ( ( + sp [ <NUM_LIT:0> ] - deltax , - sp [ <NUM_LIT:1> ] + deltay ) ) <EOL> sfrm = frame ( frame = column , pos = ( <NUM_LIT> , <NUM_LIT:3> , <NUM_LIT> ) ) <EOL> sp1 = extrusion ( frame = sfrm , pos = spiral , shape = chr , material = materials . rough ) <EOL> sfrm2 = frame ( frame = column , pos = ( <NUM_LIT> , <NUM_LIT:3> , - <NUM_LIT> ) ) <EOL> sp2 = extrusion ( frame = sfrm2 , pos = spiral , shape = chr , material = materials . rough ) <EOL> sp2 . frame . rotate ( axis = ( <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:1> ) , angle = - pi / <NUM_LIT:2> ) <EOL> sfrm3 = frame ( frame = column , pos = ( <NUM_LIT> , <NUM_LIT:3> , - <NUM_LIT> ) ) <EOL> sp3 = extrusion ( frame = sfrm3 , pos = spiral [ <NUM_LIT:30> : - <NUM_LIT:30> ] , shape = chr , material = materials . plastic ) <EOL> sp3 . frame . rotate ( axis = ( <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:1> ) , angle = - pi / <NUM_LIT:2> ) <EOL> sfrm4 = frame ( frame = column , pos = ( <NUM_LIT> , <NUM_LIT:3> , <NUM_LIT:0> ) ) <EOL> sp4 = extrusion ( frame = sfrm4 , pos = spiral [ <NUM_LIT:30> : - <NUM_LIT:30> ] , shape = chr , material = materials . plastic ) <EOL> sp4 . frame . rotate ( axis = ( <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:1> ) , angle = - pi / <NUM_LIT:2> ) <EOL> sfrm5 = frame ( frame = column , pos = ( <NUM_LIT> , <NUM_LIT:3> , + <NUM_LIT> ) ) <EOL> sp5 = extrusion ( frame = sfrm5 , pos = spiral [ <NUM_LIT:30> : - <NUM_LIT:30> ] , shape = chr , material = materials . plastic ) <EOL> sp5 . frame . rotate ( axis = ( <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:1> ) , angle = - pi / <NUM_LIT:2> ) <EOL> psp = Polygon ( spiral [ <NUM_LIT:30> : - <NUM_LIT:30> ] ) <EOL> esp = extrusion ( frame = sfrm , pos = [ ( <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> ) , ( <NUM_LIT:0> , <NUM_LIT:0> , - <NUM_LIT> ) ] , shape = psp , material = materials . plastic ) <EOL> esp . frame . rotate ( axis = ( <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:1> ) , angle = - pi / <NUM_LIT:2> ) <EOL> ctp = shapes . rectangle ( width = <NUM_LIT> , roundness = <NUM_LIT> , invert = True ) <EOL> ctf = frame ( frame = column , pos = ( <NUM_LIT:0> , <NUM_LIT> , <NUM_LIT:0> ) ) <EOL> ctop = extrusion ( frame = ctf , pos = paths . line ( end = ( <NUM_LIT:0> , <NUM_LIT> , <NUM_LIT:0> ) , np = <NUM_LIT:7> ) , <EOL> scale = [ ( <NUM_LIT:1> , <NUM_LIT:1> ) , ( <NUM_LIT> , <NUM_LIT> ) , ( <NUM_LIT> , <NUM_LIT> ) , ( <NUM_LIT> , <NUM_LIT> ) , ( <NUM_LIT> , <NUM_LIT> ) , <EOL> ( <NUM_LIT> , <NUM_LIT> ) , ( <NUM_LIT> , <NUM_LIT> ) ] , <EOL> shape = ctp , material = materials . plastic ) <EOL> ps = pstar ( pos = ( <NUM_LIT:0.0> , <NUM_LIT> , <NUM_LIT> ) ) <EOL> ps . frame . frame = column <EOL> column . rotate ( axis = ( <NUM_LIT:0> , <NUM_LIT:1> , <NUM_LIT:0> ) , angle = rotate ) <EOL> return column <EOL> bb = box ( size = ( <NUM_LIT:5> , <NUM_LIT> , <NUM_LIT:5> ) , pos = ( <NUM_LIT:0> , - <NUM_LIT> , <NUM_LIT:0> ) ) <EOL> c2 = column ( pos = ( - <NUM_LIT:1> , <NUM_LIT:0> , <NUM_LIT:0> ) , rotate = <NUM_LIT:0> ) <EOL> c3 = column ( pos = ( + <NUM_LIT:1> , <NUM_LIT:0> , <NUM_LIT:0> ) , rotate = <NUM_LIT:0> ) <EOL> afrm = frame ( pos = ( <NUM_LIT:0> , <NUM_LIT> , <NUM_LIT:0> ) ) <EOL> abrg = extrusion ( frame = afrm , pos = paths . arc ( radius = <NUM_LIT:1.0> , angle1 = <NUM_LIT:0> , angle2 = pi ) , <EOL> shape = shapes . ngon ( np = <NUM_LIT:8> , radius = <NUM_LIT> ) ) <EOL> afrm . rotate ( angle = pi / <NUM_LIT:2> ) </s>
