How can I make these trails for the lines on the planet? I made a simple test but the result is not even close to the one on the video. Do I have to write a shader to have this effect? My simple test is bellow. Thanks
Linetrail[] horizontal;
Linetrail[] vertical;
void setup()
{
size(800, 600);
int numberOfLines = 30;
int numberOfColumns = 40;
int offsetX = width / numberOfColumns;
int offsetY = height / numberOfLines;
vertical = new Linetrail[numberOfColumns];
for (int i = 0; i < vertical.length; i++)
{
vertical[i] = new Linetrail(i * offsetX, 0, i * offsetX, height);
I'm doing an application that allows the user to use the mouse to draw orthogonal lines with the mouse. Every time the user turns 90 degrees, I store that point in a ArrayList and then draw lines between the points. The last line is draw between the last point and mouseX, mouseY (fig bellow). I need to know when this last line has crossed any of the other segments. Is there an easy way to do this other than computing each line equation based on its points?
Thanks in advance