SO hereās what I have right now
so since I just started this blog you donāt know what Iām working on right now or what my progress has been on it so Iāll just give you a quick summary and yea.
So a couple weeks ago i was looking at the page for Line Integrals on wikipedia and so i was really interested in the visual given for it and the neat little scalar field they had and stuff so I decided to make my own scalar field generator.
So I started off with my basic template for javascript canvas stuff. It looks like this and is just a basic grid to make some 2d javascript images on and yea whatever.
What Iāll have it to is:
Generate six points for the high points and low points of the field
make some sort of path between the points based on a function which is based on the points that will be the basis for the scalar field
based on some x and y coordinates given it will color that point (or area) a certain color depending on its height
and then you can do different things with it like take an actual line integral or maybe find the most efficient path from point A to point B or something like that
So far it looks like this
And it was particularly fun finding parabolas based on three points. I just took a generic expression for ax2 +bx + c, three points and solved for a,b, and c and yea. and you can do that for all or any three (x,y) point and get a unique parabola.
Now I am currently creating the part where it generates a color at a point based on its distance from the blue and red parabolas. However I realized I need to find out what the closest point on each parabola is based on the (x,y) point.
So currently I am working on this desmos page to get the zero points of g(x) in a general form so I can use that in my javascript code.
So Iāll find out the nearest point, use the distance that point is from the nearest point, and generate a color based on it.
























