A4: Vector field representation (Due Oct
15)
The
purpose of this assignment is to learn something about the use particle systems
+ color and shape in representing a vector field.
·
Direction of flow
·
Strength of vector field
·
As much detail as possible
The
vector field is defined by the following differential equations
The
input is a position in the flow field. The output is the flow direction
void getVec(float X,float
Y, float &dx, float &dy)
//
this is the ODE that defines the flow
{
X *= 0.5;
Y = Y*0.9 – 0.05;
dx = 0.5 + sin(0.12*Y) ;
dy = 0.4* sin(0.4*X)+ 2.5*sin(0.1*X) +4.0*sin(0.06*X)*cos(Y*0.03) +
2.7*sin(0.015*X)*(1.0*0.5*cos(Y/50.0)) +
0.02*(Y-200);
}
visualize over the range
x from 0 .. 600 and
y from 0 .. 500 -- this should be
your window size. (from glOrtho)
This
is all about mappings
Your
input variables are (dx,dy)
= f(x,y) , that is, the specification of a vector
field
Starting
positions should be random
Display
variables at your disposal are
1)
The number of particles
2) The
amount each particle moves on each iteration
3)
The color of the particle (r,g,b)
as a function of age
4)
The size of the particle as a function of age
5)
The background color
6)
Placement of streamlines
Note: you can continuously seed the space or do it
in one shot; e.g. with 1000 particles.
Deliverables:
Provide
a written description of the way you have used the output variables to display
the three required aspects of the data approx 300-400 wds. Comment on effects. E.g. how does gray scale change affect the
presentation of direction in relation to the background value. Difficulties and possible solutions
Provide
a code listing. Your code need not be
sophisticated but it should be clear.
Your best image. Either that
or single file source code to produce an image.
Do not get too involved. This should not be a major project.