# Default settings for the ray tracing.

max_degree=7

!bound menu within simple,expert default simple
!bound size between integer 20,1000 default 200

zone=!rawmath $zone
!default zone=2

# colors: surface=silver, left=white, right=yellow, bg=skyblue
!bound surfcolor  between integer 1,$colorcnt default 13
!bound leftcolor  between integer 1,$colorcnt default 2
!bound rightcolor between integer 1,$colorcnt default 6
!bound bgcolor	  between integer 1,$colorcnt default 14

# glossy
!bound surffinish  between integer 1,$finishcnt default 3

!for c in vangle,hangle
 $c=!rawmath $($c)
 e=!evalsubst s=0 in $($c)
 !if NaN isin $e or ($c=vangle and ($e<-90 or $e>90))
  $c=
 !endif
!next c
!default vangle=15
!default hangle=25

aqualitylst=1,7,10,15,20,30,40,50
aqualitycnt=!itemcnt $aqualitylst
speedcnt=6

!if $menu=expert

 # pattern=uniform
 !bound surfpattern between integer 1,$patterncnt default 1
 !bound quality between integer 1,9 default 9
 # 1=cube; 2=ball.
 !bound contour between integer 1,2 default 1
 !bound axes	between integer 0,$finishcnt default 1
 !bound soil	between integer 0,$finishcnt default 1
 !bound aquality between 1,$aqualitycnt default 1
 !bound speed	between 1,$speedcnt default 2
 !bound looping within 0,1 default 1
 !bound s0	between -100000,100000 default 0
 !bound s1	between -100000,100000 default 1
 !for i in x,y,z
  $(i)0=!rawmath $($(i)0)
  test=!mathsubst s=$s0 in $($(i)0)
  !if NaN isin $test
   $(i)0=
  !endif
  !default $(i)0=0
 !next i

!else
 surfpattern=1
 quality=9
 !default contour=1
 !default axes=1
 !default soil=1
 aquality=1
 speed=2
 looping=1
 x0=0
 y0=0
 z0=0
 s0=0
 s1=1

!endif menu=expert?

ins_anim_loop=$[1-$looping]
!if $aquality=1 or s notvarof $poly $vangle $hangle $zone $x0 $y0 $z0
 povray_frames=1
!else
 povray_frames=!item $aquality of $aqualitylst
!endif
ins_anim_delay=$[rint(100*1.7^($speedcnt-$speed)/$povray_frames)]
povray_clock0=$s0
!if $looping=1 and $menu=expert
 povray_clock1=$[($s1-$s0)*($povray_frames-1)/$povray_frames+$s0]
!else
 povray_clock1=$s1
!endif

