Computer Graphics: Difference between revisions
Adamcolton (talk | contribs) |
Adamcolton (talk | contribs) |
||
| Line 58: | Line 58: | ||
S(t) = ∑<sub>i</sub><sup>n</sup>N<sub>i,k</sub>(t)P<sub>i</sub> | S(t) = ∑<sub>i</sub><sup>n</sup>N<sub>i,k</sub>(t)P<sub>i</sub> | ||
N<sub>i,0</sub>(t) = (t<sub>i</sub> <= t < t<sub>i+1</sub) ? 1 : 0 | N<sub>i,0</sub>(t) = (t<sub>i</sub> <= t < t<sub>i+1</sub) ? 1 : 0 | ||
N<sub>i,j</sub>(t) = (t - t<sub>i</sub>)/(t<sub>i+j</sub> - t<sub>i</sub>)N<sub>i,j-1</sub>(t) + (t<sub>i+j+1</sub> - t)/(t<sub>i+j+</sub> - t<sub>i+1</sub>)N<sub>i+1,j-1</sub>(t) | N<sub>i,j</sub>(t) = (t - t<sub>i</sub>)/(t<sub>i+j</sub> - t<sub>i</sub>)N<sub>i,j-1</sub>(t) + (t<sub>i+j+1</sub> - t)/(t<sub>i+j+1</sub> - t<sub>i+1</sub>)N<sub>i+1,j-1</sub>(t) | ||
Revision as of 18:22, 11 July 2019
I'm leaving this as is, but really my interest is "Computational Geometry"
- Broken Chalk Series This is excellent
- Graphics Gems books
- https://www.reddit.com/r/GraphicsProgramming/
- https://www.reddit.com/r/raytracing/
- https://github.com/hunterloftis/oneweekend/blob/master/readme.md
- Ray Tracing in a Weekend
- [1]
Notes
BCS
- Flat shading
- Gouraud Shading
- Phong Shading
Catmull-Clark Surface
Curves and Surfaces for CAGD
Resume: 96
CAGD: computer aided geometric design
www.mkp.com/cagd5e
Interesting solution to a type problem I've had; points cannot be directly added to points. But, say finding the center of a triangle, it's (t[0]+t[1]+t[2])/3. The solution is that affine combination of points is allowed.
A line can also be thought of as an affine map
F(t) = (1-t)t0 + (t)t1
Menelaos' Theorem:
given l1, l2 p1 = Line( l1(t0), l2(t0 )(t1) p2 = Line( l1(t1), l2(t1 )(t0)
and this works if there are more lines and more parametric points. The order of the points does not matter.
6.1 Covers degree elevation for Bezier curves; how to take n points that define a curve and find n+1 points that define the same curve.
6.4 Covers degree reduction; given n points, produce the closes possible curve with n-1 points.
B-spline
Basis Spline; a curve defined by control points and a knot vector.
- Joins many low degree Bezier curves
A k degree B-spline deined by n control points will have n-k Bezier curves. So a cubic (k=3) B-spline with 6 control points will have n-k = 6-3 = 3 Bezier curves.
- C0 continuity means that the last point on each Bezier curve is the same as the first point on the next - there are no gaps.
- C1 the derivatives of the curves are continuous
- C2 the second derivatives of the curves are continuous
The length of the knot vector is m=k+n. For a uniform knot vector (most common), the numbers will be integers increasing by one, so m=5 will be T=(0,1,2,3,4).
S(t) = ∑inNi,k(t)Pi Ni,0(t) = (ti <= t < ti+1</sub) ? 1 : 0 Ni,j(t) = (t - ti)/(ti+j - ti)Ni,j-1(t) + (ti+j+1 - t)/(ti+j+1 - ti+1)Ni+1,j-1(t)