### This is the footer that TXS output will source at the bottom. ### it's mostly UI and interaction stuff ## DEBUGGING sphere ball radius 0.10 endsphere group debugGrp instance ball translate(0.028362572193145752 0.0015395082300528884 0.057546462863683701) endinstance instance ball translate(-0.16783547401428223 -0.62333762645721436 0.81321495771408081) endinstance endgroup ### This is the footer that TXS output will source at the bottom. ### it's mostly UI and interaction stuff group regpoly #instance debugGrp #scale( {expr $param_size} {expr $param_size} {expr $param_size} ) #rotate(1 0 0)( {expr $param_rotx} ) #rotate(0 1 0)( {expr $param_roty} ) #endinstance instance txsObject scale( {expr $param_size} {expr $param_size} {expr $param_size} ) rotate(1 0 0)( {expr $param_rotx} ) rotate(0 1 0)( {expr $param_roty} ) endinstance endgroup ############ Some trivial interaction throug sliders ################ tclinit { set winName .slfwin source SLIDEUI.tcl source MATH.tcl proc CreateSliders { parent name } { set subname "slf_[subst $name]" if { $parent == {} } { set root .$subname } elseif { $parent == "." } { set root .$subname } else { set root $parent.$subname } toplevel $root ### variable name variable name slider label ### | | | ### V V V set rotx [CreateScale $name $root rotx "Rot: X" 0 -180 180 1 1 horizontal] set roty [CreateScale $name $root roty "Rot: Y" 0 -180 180 1 1 horizontal] set size [CreateScale $name $root size "Size" 0.1 0.01 0.8 0.01 1 horizontal] ### ^ ^ ^ ^ ### | | | | ### initial slider value---' | | | ### minimum slider value-------' | | ### maximum slider value------------' `- slider step value pack $rotx $roty $size -side top -fill x } CreateSliders $winName param } ########### RENDERING THE ABOVE GEOMETRY ########### ### include "display.slf" # A generic setup for displaying SLF objects ############################################ surface SURF color (0.9 0.7 0.3) endsurface group assembly instance regpoly surface SURF endinstance endgroup light amb type SLF_AMBIENT color (0.5 0.5 0.5) endlight light sun type SLF_DIRECTIONAL color (0.9 0.9 0.9) endlight group world instance assembly scale (0.2 0.2 0.2) endinstance instance amb id main_amb endinstance instance sun id left_sun rotate (0 1 0) (-45) rotate (0 0 1) (-60) endinstance endgroup camera cam projection SLF_PERSPECTIVE frustum ( -0.2 -0.2 -4 ) ( 0.2 0.2 -0.01 ) endcamera group gCam instance cam id iCam translate ( 0.0 0.0 1.0 ) endinstance endgroup window win background (0.7 0.8 0.9) endwindow viewport vp win endviewport render vp gCam.iCam.cam world light world.left_sun.sun light world.main_amb.amb endrender #################################################