Namespace generateBulbLoopPoints
Defined in: naview.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Bulb loop curve generating function.
|
Namespace Detail
generateBulbLoopPoints
Bulb loop curve generating function.
1. A centroid is calculated between two points
2. This centroid y position is raised by a given step in a given direction (scaled_centroid point)
2a. A skew value CAN added to the x positioning of this centroid point
3. Original and scaled centroid are returned.
4. Two new points (bulb points) are generated:
4a. They are created before the first point and after the second point (horizontally) by a given x_step
4b. Their vertical position is arranged at a percentage of the y step
1. A centroid is calculated between two points
2. This centroid y position is raised by a given step in a given direction (scaled_centroid point)
2a. A skew value CAN added to the x positioning of this centroid point
3. Original and scaled centroid are returned.
4. Two new points (bulb points) are generated:
4a. They are created before the first point and after the second point (horizontally) by a given x_step
4b. Their vertical position is arranged at a percentage of the y step
- Parameters:
- {Array} p1
- point 1 (start)
- {Array} p2
- point 2 (end)
- {number} step_x
- number of pixels to scale bulb points
- {number} step_y
- number of pixels to scale centroid generating y scaled curve center
- {number} perc_step_y
- (0 to 1), percentage of y step to generate bulb points
- {number} y_direction
- (1.0 or -1.0), y direction to scale bulb points
- {number} x_skew_perc
- Optional percentual between centroid x and point 1 x to move the y scaled curve center
- {Object} add_wavefold_obj
- Optional: addition of a folding object. See