Code:
// LaserBoy_utility.hpp
// line 95
//############################################################################
inline int inline_dwell_vertices(double angle, // zero to pi radians
int sample_rate,
double max_dwell_microsec
)
{
if(angle < (pi / 8))
return 0;
return (int)(ceil( (angle / pi) // zero to one
* (sample_rate * (max_dwell_microsec / 1000000.0))
)
);
}
This is the function for calculating the number of points to add to an angle. It is linear as you can see. That is, it adds points proportional to the angle from 0 to pi radians for anything over (pi / 8) radians (22.5 degrees). And it is based on sample_rate.
Frame 16 of in.ild was designed to test for dwell.
Menu h now has two modes. You toggle between them with the letter t.
You can flatten Z on this frame to make it easier to differentiate between the actual XYZ view and the XYT, vertex order in depth ( [Tab] 1 j ). Then look at it before and after you add or remove dwell from the front ( digit 5 ) or from the side ( digit 6 ).
I think I see the issue! It is possible to keep adding angle dwell over and over again. So it is probably being added multiple times in your wave example, since you are probably optimizing in menu h and then choosing to output an optimized wav.
I'll fix that!
Code:
// LaserBoy_segment.cpp
// in function LaserBoy_Error_Code LaserBoy_segment::add_dwell()
// at about line 2314
LaserBoy_segment angle_optimized(palette_index, false);
//----------------------------------------------------------------
remove_dwell_vertices(); // <-- add this line!
//----------------------------------------------------------------
angle_optimized.push_back(front());
Excellent find! Thank you!
I just sneaked it into the current version. I will do another full release when I have more new stuff.
Now maybe you can figure out why the clip operator in Liquid Math can't handle an area of nothing.
James.
.