Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /branches/pure-cfg/doc/report/vr-lite.tex
ViewVC logotype

Diff of /branches/pure-cfg/doc/report/vr-lite.tex

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 477, Sat Nov 13 16:02:07 2010 UTC revision 940, Fri Apr 22 13:58:20 2011 UTC
# Line 11  Line 11 
11  image(3)[] img = load (dataFile);  image(3)[] img = load (dataFile);
12  field#1(3)[] F = img $\circledast$ bspln3;  field#1(3)[] F = img $\circledast$ bspln3;
13    
14  actor RayCast (int row, int col)  strand RayCast (int row, int col)
15  {  {
16      vec3 pos = orig + real(row)*rVec + real(col)*cVec;      vec3 pos = orig + real(row)*rVec + real(col)*cVec;
17      vec3 dir = (pos - eye)/|pos - eye|;      vec3 dir = (pos - eye)/|pos - eye|;
# Line 23  Line 23 
23      update {      update {
24          pos = pos + stepSz*dir;          pos = pos + stepSz*dir;
25          if (inside (pos,F)) {          if (inside (pos,F)) {
26              real val = F@pos;              real val = F(pos);
27              vec3 grad = ($\nabla$ F)@pos;              vec3 grad = $\nabla$F(pos);
28              vec3 norm = -grad/|grad|;              vec3 norm = -grad/|grad|;
29              if (val > opacMin) {  // we have some opacity              if (val > opacMin) {  // we have some opacity
30                  real opac = 1.0 if (val > opacMax)                  real opac = 1.0 if (val > opacMax)

Legend:
Removed from v.477  
changed lines
  Added in v.940

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0