0
Under review

Please help with vectorfieldvisual3D

rich 10 years ago updated by anonymous 5 years ago 3
i have this:
HelixToolkit.Wpf.HelixViewport3D viewport = new HelixToolkit.Wpf.HelixViewport3D();
HelixToolkit.Wpf.DefaultLights light = new HelixToolkit.Wpf.DefaultLights();
viewport.Children.Add(light);
viewport.ShowCameraInfo = true;
this.grid.Children.Add(viewport);
Vector3DCollection vectors=new Vector3DCollection();
Point3DCollection points= new Point3DCollection();
HelixToolkit.Wpf.VectorFieldVisual3D vfield = new HelixToolkit.Wpf.VectorFieldVisual3D();

//then the calculations of the vector field
while(i<=niterx)
{
j=0;
while(j<=nitery)
{
k=0;
while(k<niterz)
{
//caculations of a vector function go here. xvalue,yvalue,zvalue are spaced on a grid, and the functions give vectorvalx,vectorvaly, etc
points.Add(new Point3D(xvalue[i], yvalue[j], zvalue[k]));
vectors.Add(new Vector3D(vectorvalx[i, j, k], vectorvaly[i, j, k], vectorvalz[i, j, k]));
k++;
}
j++;
}
i++;
}

vfield.Positions = points;
vfield.Directions = vectors;


vfield.Diameter = 5;
vfield.HeadLength = 2;
vfield.Fill = new SolidColorBrush(Colors.Black);


viewport.Children.Add(vfield);



i cant figure out why its not working. the vectorfieldvisual3d doesnt render. What am i missing?
please help and merry xmas
actually i had to use updatemodel to get them to render. Seems kinda inconsistant considering the other types you dont have to.

Anyway, even though theyre rendering the heads seem displaced from the actual body of the arrows for some reason. Please help thanks
Under review
This is covered by the following issues, right?
https://github.com/helix-toolkit/helix-toolkit/issues/102
https://github.com/helix-toolkit/helix-toolkit/issues/103

Please contribute to get this corrected :)