Bedstraw:: Bedstraw Automation [Changes]   [Calendar]   [Search]   [Index]   [PhotoTags]   

*Bedstraw* [smilax]
 
[Mega-Changes]
[Mega-Calendar]

Bedstraw Automation

BEGIN

http://smilax.org/154.bed?m=amella&a=0

http://smilax.org/154.bed?m=rr&a=0

1
clock format 1296760103
Thu Feb 03 19:08:23 UTC 2011
2

proc @ args {
  set x [uplevel 1 $args]
  set z ""
  while {[string length $x] > 150} {
    append z [string range $x 0 149] \n
    set x [string range $x 150 end]
  }
  return "$z$x"
}
3

proc Sin deg {expr {sin($deg*0.0174532925)}}
4
proc Cos deg {expr {cos($deg*0.0174532925)}}
5

proc =amella {} {
  set prog {|uuUUUUuu.<<<<.<<<<.<<<<.<<<<||||-|-|-|-|-|-|||||uuUUUUUUUUUU}
  set prog {|uuUUUUuu.<<<<.<<<<.<<<<.|uUu||-|-|-|-|-|-||<<<<|<<|uUUUUUUUUUU.#<<<<<<<<.<<<<<<<<.<<<<<<<<.||||.>>>>>|||||||><||-|-|-|-|-|-|-|-|-|-|<>||||.||||||.||||||#<<<<<<<}
  set x 80.70
  set y 50 ;# 53.4
  set z 62
  set L 4
  set k 90
  set dj 6
  set dk 5
  set dz 0.4
  set pre "Z;240;"
  foreach c [split $prog ""] {
    set x_ $x
    set y_ $y
    set z_ $z
    set j 0
    set k_ $k
    set len $L
    switch '$c {
    '# {
      append pre "m;$x,$y,$z;"
    }
    '- {
      set len -8
      set z_ [expr $z+0.01]
    }
    '. {
    }
    '| {
      set len 10
    }
    'u {
      set len 10
      set z_ [expr {$z + $dz*$len/$L}]
      set j [expr {-1 * $dj}]
    }
    'U {
      set len 10
      set z_ [expr {$z + 2*$dz*$len/$L}]
      set j [expr {-2 * $dj}]
    }
    '< {
      set k_ [expr {$k+$dk}]
    }
    '> {
      set k_ [expr {$k-$dk}]
    }
    }
    set x_ [expr {$x + $len*[Cos $k_]*[Cos $j]}]
    set y_ [expr {$y + $len*[Sin $k_]*[Cos $j]}]
    set mx [expr {($x+$x_)/2.0}]
    set my [expr {($y+$y_)/2.0}]
    set mz [expr {($z+$z_)/2.0}]
    set endGuide "r;0,0,[expr 0.0174532925*$k_];!;X;#27|'Guide;X;#18|#-1|<1,1,1>|%0.0"
    set end "r;0,0,[expr 0.0174532925*$k_];!"
    if {$len > 0} {
      lappend prims [list x $mx y $my z $mz-0.25 r $len s 5 t 0.5 j $j pre $pre end $end]
      lappend prims [list x $mx y $my z $mz+0.5 r $len s 0.5 t 0.64 j $j pre $pre end $endGuide]
    }
    set x $x_
    set y $y_
    set z $z_
    set k $k_
  }
  list 112277000 $prims
}
6

proc =rrr {} {
  set x 80.70
  set y 53.4
  set z 62
  set L 4 ;#2
  set LL 10
  set k 90
  set dk -5 ;#-2.5

  foreach _n_ [io 6] {
    set x_ [expr {$x}]
    set y_ [expr {$y + 10}]
    set z_ [expr {$z+1}]
    set j -6

    set end [list "r;0,0,[expr 0.0174532925*$k];!"]
    lappend prims "x ($x+$x_)/2.0 y ($y+$y_)/2.0 z (($z+$z_)/2.0)-0.25 r $LL s 5 t 0.5 j $j end $end"
    lappend prims "x ($x+$x_)/2.0 y ($y+$y_)/2.0 z (($z+$z_)/2.0)+0.5 r $LL s 0.5 t 0.64 j $j end $end"

    set k [expr {$k+0}]
    set x $x_
    set y $y_
    set z $z_
  }
  foreach _n_ [io 200] {
    set x_ [expr {$x + $L*[Cos $k]}]
    set y_ [expr {$y + $L*[Sin $k]}]
    set z_ [expr {$z+0.4}]

    set j -6
    set end [list "r;0,0,[expr 0.0174532925*$k];!"]
    lappend prims "x ($x+$x_)/2.0 y ($y+$y_)/2.0 z (($z+$z_)/2.0)-0.25 r $L s 5 t 0.5 j $j k 0 end $end"
    lappend prims "x ($x+$x_)/2.0 y ($y+$y_)/2.0 z (($z+$z_)/2.0)+0.5 r $L s 0.5 t 0.64 j $j k 0 end $end"

    set k [expr {$k+$dk}]
    set x $x_
    set y $y_
    set z $z_
  }
  list 112266000 $prims
}
7

proc =rr {} {
  set X 80.70
  set Y 53.4
  set Z 62
  foreach i [io 9] {
    lappend z "x $X y $Y+$i*10+5 z $Z-0.25 r 5 s 10 t 0.5 end !"
    lappend z "x $X y $Y+$i*10+0 z $Z+0.5 r 0.5 s 10 t 0.64 end !"
  }
  list 112255000 $z
} ; @ =rr
112255000 {{x 80.70 y 53.4+0*10+5 z 62-0.25 r 5 s 10 t 0.5 end !} {x 80.70 y 53.4+0*10+0 z 62+0.5 r 0.5 s 10 t 0.64 end !} {x 80.70 y 53.4+1*10+5 z 62 -0.25 r 5 s 10 t 0.5 end !} {x 80.70 y 53.4+1*10+0 z 62+0.5 r 0.5 s 10 t 0.64 end !} {x 80.70 y 53.4+2*10+5 z 62-0.25 r 5 s 10 t 0.5 end !} {x 80.70 y 53.4+2*10+0 z 62+0.5 r 0.5 s 10 t 0.64 end !} {x 80.70 y 53.4+3*10+5 z 62-0.25 r 5 s 10 t 0.5 end !} {x 80.70 y 53.4+3*10+0 z 62+0.5 r 0.5 s 10 t 0.6 4 end !} {x 80.70 y 53.4+4*10+5 z 62-0.25 r 5 s 10 t 0.5 end !} {x 80.70 y 53.4+4*10+0 z 62+0.5 r 0.5 s 10 t 0.64 end !} {x 80.70 y 53.4+5*10+5 z 62-0 .25 r 5 s 10 t 0.5 end !} {x 80.70 y 53.4+5*10+0 z 62+0.5 r 0.5 s 10 t 0.64 end !} {x 80.70 y 53.4+6*10+5 z 62-0.25 r 5 s 10 t 0.5 end !} {x 80.70 y 5 3.4+6*10+0 z 62+0.5 r 0.5 s 10 t 0.64 end !} {x 80.70 y 53.4+7*10+5 z 62-0.25 r 5 s 10 t 0.5 end !} {x 80.70 y 53.4+7*10+0 z 62+0.5 r 0.5 s 10 t 0.64 end !} {x 80.70 y 53.4+8*10+5 z 62-0.25 r 5 s 10 t 0.5 end !} {x 80.70 y 53.4+8*10+0 z 62+0.5 r 0.5 s 10 t 0.64 end !}}
8

proc matrix {} {
  set z {}
  foreach x [io 10] {
    foreach y [io 10] {
      lappend z "x 20+$x*10 y 20+$y*10 z 60 R $x/10.0 G 0 B $y/20.0 r 10 s 10 t 10"
    }
  }
  set z
}
9
proc =matrix {} {
  list 112233000 [matrix]
}; #@ =matrix
10

proc =wall {} {
  foreach i [io 25] { #64
    set t "tx 117a07e9-aece-5883-7dc8-4ddce8e93eec"
    set t {pp {#17|#-1|'79d91a7c-d50d-d261-0437-4256d5c58fe8|<1,1,4>|<0,0,0>|%0.0} end !}
    #set t {pp {#18|#-1|<0.0,1.0,0.0>|%0.9}}
    lappend z "x 1 y 4*$i+2 z 0 R 0.5 G 0.5 B 0.5 r 2 s 2 t 8 $t"
    lappend z "x 99 y 4*$i+2 z 0 R 0.5 G 0.5 B 0.5 r 2 s 2 t 8 $t"
    lappend z "x 4*$i+2 y 1 z 0 R 0.5 G 0.5 B 0.5 r 2 s 2 t 8 $t"
    lappend z "x 4*$i+2 y 99 z 0 R 0.5 G 0.5 B 0.5 r 2 s 2 t 8 $t"
  }
  list 112244000 $z
}
END
(last modified 2011-02-10)       [Login]
(No back references.)