All programs come with sources and executables:
(Comments are in German, though)
Pascal and C programs for DOS:
Intersection of two lines:
Intlines.ZIP
Intersection line circle: intersection of line and circle
Lincirc.ZIP
Intersection of two circles:
Intcirc.ZIP
Folium:
Function discovered by German astronom Kepler
Folium.ZIP
Rhodonea:
Leaves of roses
Rhodonea.ZIP
Parabola: drawn as envelope of tangents
Parabola.ZIP
Lemniscate of Bernoulli: drawn as an envelope.
Start with rectangular hyperbola and draw circles
whose centres lie on the hyperbola and at the same time pass
through the centre of the hyperbola.
Lemniska.ZIP
Cardioid:Cardioid drawn as an envelope.
Cardiod.ZIP
Cartesian ovals: Function that looks like an egg.
Egg.ZIP
Area of quadrilateral: area of quadrilateral, need not be convex,
according to Brahmagupta
Brahma.ZIP
Plotting of implicit functions: Three programs in Pascal plotting only
dots and no contours.
Implicit.ZIP
Contour drawing: The Cartesian leaf drawn as a contour map
r = a.(c + b.sin(t/2)); x = r.cos(t); y = r.sin(t)
This code is based on a basic program in an old BYTE magazine article
by Paul D. Bourke
Included is a universal pascal unit for HPGL output on a HP Laserjet III printer.
Contour1.ZIP
The devil's curve:
parametric drawing of -x4 +
y4 + 50.x2 - 48.y2 = 0
Devil.ZIP
Morley's theorem:
Morley1.ZIP
Polygon:
Take any convex polygon.with an even number of sides. Find the mid-points
of the sides
and join them, thus
inscribing a new polygon. Repeat that and you end up with opposite sides
being
parallel and equal
in length.
Polygon.ZIP
Polygons turned:Turning of polygon families
Polyturn.ZIP
The quadratic equation:
Ax2 + Bx + C = 0
Two different algorithms
show limitations of floating point library precision in Pascal and C.
Coefficients A,B,C are real and x is complex.
Equ2.ZIP
The exact solution of equations up to the 4th power:
Ax4 + Bx3 + Cx2 + Dx + E = 0
Coefficients A,B,C,D,E are real and x is complex.
There are two versions in Pascal and C.
If you know any source on the exact solution of the equation to the
5th power, please let me know via e-mail!
Equ1to4.ZIP
GNU C programs for Linux using the X Library:
Raysphere:
simple raytracing on a sphere and floor with triangls:
Raysphere.ZIP
Equation to the 4th power: linux port of above DOS program
Equation4.ZIP
Klothoid:
Function used for road planning
Klothoid.ZIP