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[source]

Color of Light.

color_in_rgb()[source]

Returns the rgb value of the defined light color.

generate_visualization_dict()[source]

Returns a dictionary of all the info required for the visualization of this PointLight.

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

Returns:

a dictionary containing following keys: :

name : name of the PointLight

color : color of the light used.

simulation_matrix : a N*4*4 matrix, converted to list, for

passing to Javascript for animation purposes, where N is the :

number of timesteps for animations. :