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

SCM Repository

[diderot] View of /branches/vis15/src/tests/rtest/tests/curl2d/curl2d.diderot
ViewVC logotype

View of /branches/vis15/src/tests/rtest/tests/curl2d/curl2d.diderot

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4497 - (download) (annotate)
Sat Sep 3 14:12:36 2016 UTC (2 years, 6 months ago) by jhr
File size: 538 byte(s)
  working on merge: updating tests with new version 2 syntax
#version 2.0
// process output with:
// unu quantize -i out.nrrd -b 8 -o curl-turb2d.png


int imgSizeX = 16;
int imgSizeY = 16;

field#1(2)[2] V = load_image("../../data/const-curl2d.nrrd") ⊛ bspln3;

strand CURL (int xi, int yi) {
	real xx = lerp(2.00, 17.0, 0.0, real(xi), real(imgSizeX)-1.0);
	real yy = lerp(2.00, 17.0, 0.0, real(yi), real(imgSizeY)-1.0);
	vec2 pos = [xx,yy];

	output real out = 0.0;

	update {
		out = ∇×V(pos);

		stabilize;
	}
}

create_array { CURL(xi, yi) | yi in 0..(imgSizeY-1), xi in 0..(imgSizeX-1) }

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