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

SCM Repository

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

View of /branches/vis12/rtest/tests/curl2d/curl2d.diderot

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2547 - (download) (annotate)
Fri Feb 21 16:47:26 2014 UTC (7 years, 2 months ago) by nseltzer
File size: 518 byte(s)
Curl regression tests
// 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 = 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;
	}
}

initially [ 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