Lights

PointLight

class pydy.viz.light.PointLight(*args, **kwargs)[source]

Creates a PointLight for the visualization The PointLight is inherited from VisualizationFrame,

It can also be attached to dynamics objects, hence we can get a moving Light. All the transformation matrix generation methods are applicable to a PointLight. Like VisualizationFrame, It can also be initialized using: 1)Rigidbody 2)ReferenceFrame, Point 3)ReferenceFrame, Particle Either one of these must be supplied during initialization

Unlike VisualizationFrame, It doesnt require a Shape argument.

color

Color of Light.

color_in_rgb()[source]

Returns the rgb value of the defined light color.

generate_scene_dict()[source]

This method generates information for a static visualization in the initial conditions, in the form of dictionary. This contains light parameters followed by an init_orientation Key.

Before calling this method, all the transformation matrix generation methods should be called, or it will give an error. Returns ======= A dict with following Keys:

  1. name: name for the camera
  2. color: Color of the light
  3. init_orientation: Initial orientation of the light object
generate_simulation_dict()[source]

Generates the simulation information for this Light object. It maps the simulation data information to the scene information via a unique id.

Before calling this method, all the transformation matrix generation methods should be called, or it will give an error.

Returns:

A dictionary containing list of 4x4 matrices mapped to

the unique id as the key.