Author Topic: Drawing a line between two points via pixel processor  (Read 926 times)

Hello!

I am trying to make pixel processor draw a line between two points. I was inspired by the gradient axial node where I noticed that it basically creates a gradient between two points and later by the shape extrude node which has a fx map to do most of the job(and is really slow to compute). I am still new in the whole programming logic so I am trying to understand how it works.  Also, if moderator allows it,  can anyone recommend me any good tutorial course school or something for working with fx nodes, pixel processors and the like specifically or with programming in general?

As far as I can tell, I could use the y-y1=m(x-x1) where m=(y2-y1)/(x2-x1)but the thing is I do not know how to define width for it and also I am a bit unsure what role does $pos have and whether do I need it or not. Basically If I only could find a way to control a width for gradient axial slope i would be satisfied.
Last Edit: November 18, 2019, 09:42:43 pm

I managed to make a 'line' sort of...that is the line between black and white follows two position points but because I used the fore mentioned equation there is no distance parameter e.g. I cant adjust the length of the line. I know that for that I need a dot product but I do not know how to implement it in this one

I managed to achieve what I wanted but it took me more nodes than I am proud of. If anyone has an idea to optimize it more please tell...It became awfully quiet on this forum...

Well done! That's nice work.
Sorry it's been quiet for you on the forum. The technical support subforum seems more active.
I'll dig into this and see if I can come up with any ideas.