MCPcopy Create free account
hub / github.com/LeCAR-Lab/model-based-diffusion / square_vector_field_fn

Method square_vector_field_fn

mbd/scripts/vis_manim.py:296–302  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

294 ).shift(box1.get_bottom() + DOWN * 1.0)
295
296 def square_vector_field_fn(x):
297 value = np.abs(x[0]) < 0.6 and np.abs(x[1]) < 0.6
298 vec = 0.2 * np.array([x[0] / 1.0 / scale, x[1] / 1.5])
299 if value:
300 return vec
301 else:
302 return -vec
303
304 square_vector_field = ArrowVectorField(
305 square_vector_field_fn,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected