yt.extensions.volume_rendering.TransferFunction.add_line

TransferFunction.add_line(start, stop)

Add a line between two points to the transmission function.

This will accept a starting point in (x,y) and an ending point in (x,y) and set the values of the transmission function between those x-values to be along the line connecting the y values.

Parameters :

start : tuple of floats

(x0, y0), the starting point. x0 is between the bounds of the transfer function and y0 must be between 0.0 and 1.0.

stop : tuple of floats

(x1, y1), the ending point. x1 is between the bounds of the transfer function and y1 must be between 0.0 and 1.0.

Examples

This will set the transfer function to be linear from 0.0 to 1.0, across the bounds of the function.

>>> tf = TransferFunction( (-10.0, -5.0) )
>>> tf.add_line( (-10.0, 0.0), (-5.0, 1.0) )

Previous topic

yt.extensions.volume_rendering.TransferFunction.add_gaussian

Next topic

yt.extensions.volume_rendering.TransferFunction.add_step

This Page