I'm trying to make a linear regression plane visualization tool for a math project. Currently I have the math parts completed, but I am not sure how to graph the plane. I have a equation in the form of z=C+xD+yE, where C, D, and E are known constants. How do I graph the plane using these information? Thanks.
github page: https://saxocellphone.github.io/LAProject/
I see your problem is not with math, but with three, as WestLangley pointed out in his comment you can play with rotations etc. or create a simple triangle which is the easiest way
since you have your equation for the plane create 3 points to form a triangle
now form a new geometry as in How to make a custom triangle in three.js
create a simple material and add it to a scene
that should get you going, you can add another triangles, or make it larger with choosing points that are further apart
This equation gives full information about the plane. What else you need to graph (plot, draw?) it? Probably it depends on your graphic software possibilities. Canonical form of given equation:
Normal to the plane is
(D, E, -1)
. Distance to the coordinate originAbs(C)/Sqrt(D^2+E^2+1)
.Plane intersects coordinate axes at values
(-C/D), (-C/E), (C)