A Guide to Graphing Continuous Geometry in Racket
May 4, 2026
Contents
1 Circles and Transformations
A circle can be defined in a few ways, but we will simply define its basic identity in terms of its standard equation:
\(\seteqnumber{0}{}{0}\)\begin{equation*} x^2 + y^2 = r^2 \end{equation*}
The variables in a circle’s standard equation are squared because it directly comes from the Pythagorean Theorem. Truly, when we say a circle is defined in terms of its standard equation, we mean that it is defined as all points \((x,y)\) that are exactly a magnitude of \(r\) from the centre.1And the magnitude from the centre to any point \((x,y)\) is:
\(\seteqnumber{0}{}{0}\)\begin{equation*} \vecnorm {u}=\sqrt {x^{2}+y^{2}} \end{equation*}
1. It is common procedure to refer to magnitude instead as distance. However, it is more ontologically precise to explicitly name magnitude as the substance we are working with, because distance is an abstract measurement that exists only contextually rather than distinctly.
1.1 Standard Circles
Graphing a standard circle with its centre at \((0,0)\). Let us present a predicament in which we are given the equation \(x^2 + y^2 = 4\), and are tasked with plotting our circle in Racket. One might be tempted to simply set the radius to 4; however, the true radius of this circle is 2. One may wonder how we arrived at this value–do the exponents of \(x\) and \(y\) denote the radius of the circle, or did we take the square root? Remember that we established the radius \(r\) is equal to the magnitude:
\(\seteqnumber{0}{}{0}\)\begin{equation*} r = \vecnorm {u} = \sqrt {x^{2}+y^{2}} \end{equation*}
It is standard convention to square both sides of this equation for simplicity, which then yields the standard equation of a circle we introduced earlier:
\(\seteqnumber{0}{}{0}\)\begin{equation*} r^2 = x^{2}+y^{2} \end{equation*}
Withal, by transitivity of equality if \(x^2 + y^2 = r^2\) and \(x^2 + y^2 = 4\) then:2
\(\seteqnumber{0}{}{0}\)\begin{equation*} r^2 = 4 \end{equation*}
Therefore, to find the true value of \(r\) , we take the square root of both sides:
\(\seteqnumber{0}{}{0}\)\begin{equation*} \begin{split} &\sqrt {x^2 + y^2} = \sqrt {4} \\ &\sqrt {x^{2}+y^{2}}=2 \end {split} \end{equation*}
What we can now conclude is that the equation \(x^{2}+y^{2}=4\) is simply a consequence of the Pythagorean theorem, but the magnitude \(r\) of our circle is the scalar value of 2.
2. Transitivity of equality is a fundamental axiom in math and logic, which states that if a quantity is equal to a second quantity, and that second quantity is equal to a third, then the first and third quantities are equal to eachother: \(\text {if } a=b \text { and } b=c, \text { then } a=c\).
1.1.1 Parametric Transformation of Representation
Visualizing a circle expressed in standard form through computational means is best done by converting its standard form to parametric form.3A transformation of a circle’s standard form to parametric form can be considered a syntactic transformation–excluding it from what we would call topological transformations.4Formally, the conversion of implicit form to explicit form is known as an algebraic change.
Converting the implicit form \(x^{2}+y^{2}=r^{2}\) to explicit form is first done by equivalent substitution of \((x,y)\) to:
\(\seteqnumber{0}{}{0}\)\begin{equation*} \begin{split} &x = r\cos (t) \\ &y = r\sin (t) \\ &\text {Such that }t \in [0, 2\pi ] \end {split} \end{equation*}
Since we already established that \(r=2\), we can finally write our explicit functions:
\(\seteqnumber{0}{}{0}\)\begin{equation*} \begin{split} &x = 2\cos (t), y = 2\sin (t) \\ &t \in [0, 2\pi ] \end {split} \end{equation*}
You might notice that our conversion is done in terms of the parameter \([0,2\pi ]\). One might wonder “Isn’t a unit circle also restricted to \([0,2\pi ]\)–is this related somehow?” The answer is that the parametric form is the unit circle–stretched by a scalar value, which in our case is 2. It may be useful here to acknowledge that a vector is composed of magnitude \(\vecnorm {u}\) (how far) and direction \(\vechat {u}\) (which way). Before we converted our implicit equation into parametric form, we only knew our magnitude \(r=\vecnorm {u}\). Now that we have the parametric form of our equation, we know our unit circle coordinates \((\cos (t), \sin (t))\)–and this provides us with our circular direction \(\vechat {u}\).
We previously only acknowledged an algebraic change of implicit to explicit, but we can now acknowledge the subsequent stretching of the unit circle by magnitude of 2 as a scaling transformation. This is because when we changed to a parametric equation, we took our circular direction and scaled it outward by our specific magnitude, \(r\) .
3. A standard equation in geometry is known as an implicit equation, because it does not tell you exactly what y is, and thus, it is not a true function. Parametric form is what we call an explicit equation because it explicitly defines what the value of y is. It is possible to graph an implicit equation, but the lines are likely to be jagged and would require compensation of slopes.
4. The word syntax comes from koin Greek word suntáxein (συντάσσειν), which was specifically developed as reference to the grammatical order of words. Though, the english term we use is partly borrowed from the Latin syntaxis which itself was developed from Greek. Oxford University Press. doi:10.1093/OED/1603449563
1.1.2 Parametric Form as Dot Product
We must distinguish between the algebraic definition of the dot product, and the geometric definition of the dot product. The algebraic definition of a dot product is:
\(\seteqnumber{0}{}{0}\)\begin{equation*} \vec {u} \cdot \vec {v} = u_x v_x + u_y v_y \end{equation*}
This definition does not account for angles or shapes; hence, all it does is multiply and add lists of numbers. You would use this definition if you only knew the raw coordinates of two vectors \(\vec {u} = (u_x, u_y)\) and \(\vec {v} = (v_x, v_y)\). But what if we are handling geometric relationships? In that case, we would use the geometric definition of the dot product:
\(\seteqnumber{0}{}{0}\)\begin{equation*} \begin{split} &\vec {u} \cdot \vec {v} = ||\vec {u}|| ||\vec {v}|| \cos (\theta ) \\ &\text {Such that } \theta \text { is the angle between them.} \end {split} \end{equation*}
Parametric Form in Lambda Calculus
In pure lambda calculus, we do not have pairs; instead, what we use are church pairs. A church pair is a function which itself takes another function and applies it to our two values. Racketuses what is called prefix notation. Prefix notation is a model of evaluation which evaluates a combination (+ 1 2), by applying the left most operator (+) and applies it to the operands (1 2). It is natural to assume that a church pair is equivalent to prefix evaluation. However, in the universe of lambda calculus, data does not exist; rather, we have functions. Data is something which can be considered inactive, while a Church pair is an active function that possesses your two values. And the only way for an operator to be applied on those values in our Church pair, is if given the operator by another function.
1.1.3 Graphing a Standard Circle in Racket
Here I will go over the actual code for graphing a standard circle with an origin at \((0,0)\).
1.2 Shifted Circles
Here I will introduce shifted circles and the new standard equation of a circle:
\(\seteqnumber{0}{}{0}\)\begin{equation*} (x - h)^2 + (y - k)^2 = r^2 \end{equation*}
I should have already clarified (according to a todonote) that x and y represent an infinite amount of possible coordinates for a given circle’s boundary. I will be referencing the fact that I had already stated this in an earlier section.
2 Parabolas and Transformations
3 Hyperbolas and Transformations
When given the equation \(x^2 = 4y + 8\), you start by doing smaller algebra:
\(\seteqnumber{0}{}{0}\)\begin{equation*} \begin{split} &\text {The goal here is to force an explicit equation by isolating y and x.} \\ &x^2 = 4y + 8 \longrightarrow x^{2}-8 = 4y \\ &\frac {x^2}{4} -\frac {8}{4} = \frac {4y}{4} \\ &\frac {1}{4}x^{2} -2 = y \end {split} \end{equation*}
The form \(y = ax^2 + bx + c\) is the most basic equation of a parabola.
4 Geometric Sequences?
I’m adding this section here, but I might just make a separate document for discrete mathematics, so this is just here temporarily for reference. In Geometric Sequences, each term is obtained through the multiplication of a previous term by a non-zero real number called the common ratio. The common ratio of a geometric sequence is the constant that you multiply each term by in order to get the next term in the sequence. The general formula for a common ratio is:
\(\seteqnumber{0}{}{0}\)\begin{equation*} r = \frac {a_n}{a_{n-1}} \end{equation*}
Note that this formula tells you how to compute r from two consecutive terms in a given geometric sequence. Now to actually find the common ratio \(r\), you start by diving any term by the term before it. For example, let’s say we are given the sequence \(5, 15, 45,...\), then we do:
\(\seteqnumber{0}{}{0}\)\begin{equation*} \begin{split} &\text {Let } a_{2} = 15 \\ &a_{n-1} = a_{2-1} = a_{1} \\ &a_{1} = 5 \\ &r = \frac {15}{5} = 3 \\ &r = 3 \end {split} \end{equation*}
It might be worth mentioning that \(a_n\) doesn’t necessarily have to be the second term in a given sequence; it could be the fifth, third, sixth, et cetera.
The general formula requires you to know two adjacent terms, such as \(a_1\) and \(a_2 \). But what if we only know \(a_2 = -8\) and \(a_5 = -216\)? In this case, we already know \(a_2\) so let’s just find the term before. We know that it takes 3 jumps to get from \(a_2\) to \(a_5\), which implies that it takes \(r^{3}\), but we include the starting term so its:
\(\seteqnumber{0}{}{0}\)\begin{equation*} a_{5}=a_{2} \cdot r^{3} \end{equation*}
What we just did is make our own formula. Now we plugin our known values:
\(\seteqnumber{0}{}{0}\)\begin{equation*} \begin{split} &-216 = -8 \cdot r^3 \\ &27 = r^3 \\ &r = 3 \\ &\text { because } 3^3 = 27 \end {split} \end{equation*}
Now to find \(a_1\), we work backwards by a single step:
\(\seteqnumber{0}{}{0}\)\begin{equation*} \begin{split} &a_2 = a_1 \cdot r \\ &-8 = a_1 \cdot 3 \\ &a_1 = -\frac {8}{3} \\ &a_1 = -\frac {8}{3} \\ &r = 3 \end {split} \end{equation*}