-
The results of the random 2D and 3D Vector Fields look promising for my application where I want to drop a point in random coordinates and see where it flows to do some reinforcement learning predictions. How do I get the vector at a particular coordinate (float) in the random vector field? I'm looking for a method like getVectorValue (x,y,z). There's doesn't seem to be an obvious solution in the API. Also, is there a way can I extend the SRF method to add a point to the plot? I would like to animate the point moving through the 2d space after random initialization in the random 2D vector field. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi Tristan, that's pretty simple, you can follow the short example in the readme and simply replace the import numpy as np
import gstools as gs
model = gs.Gaussian(dim=2, var=1, len_scale=10)
srf = gs.SRF(model, generator='VectorField', seed=19841203)
p1 = [0, 0]
p2 = [0, 1]
srf(p1)
srf(p2) Calculates the random vectors at points Setting the spatial random field up is the expensive part (the part above I hope that helps. |
Beta Was this translation helpful? Give feedback.
Hi Tristan,
that's pretty simple, you can follow the short example in the readme and simply replace the
x
andy
vectors with single points.Calculates the random vectors at points
p1
andp2
.Setting the spatial random field up is the expensive part (the part above
p1
andp2
), calculating the random vectors at the points is pretty fast.I hope that helps.