I have seen the batman curve before (asked about here: Is this Batman equation for real?), but this method seems fairly limited in what you can draw. What are some other ways that you can draw shapes and images throught equations?
2026-04-05 13:06:39.1775394399
How can you draw images with functions?
4.7k Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
1
There are 1 best solutions below
Related Questions in GRAPHING-FUNCTIONS
- Lower bound of bounded functions.
- Do Irrational Conjugates always come in pairs?
- Graph rotation: explanation of equation
- Plot function y = tan(yx)
- Sketching a lemniscate curve with a max function?
- 3 points on a graph
- show $f(x)=f^{-1}(x)=x-\ln(e^x-1)$
- What is this method of sketching a third degree curve?
- Getting a sense of $f(x) = x (\log x)^6$
- Can I describe an arbitrary graph?
Trending Questions
- Induction on the number of equations
- How to convince a math teacher of this simple and obvious fact?
- Find $E[XY|Y+Z=1 ]$
- Refuting the Anti-Cantor Cranks
- What are imaginary numbers?
- Determine the adjoint of $\tilde Q(x)$ for $\tilde Q(x)u:=(Qu)(x)$ where $Q:U→L^2(Ω,ℝ^d$ is a Hilbert-Schmidt operator and $U$ is a Hilbert space
- Why does this innovative method of subtraction from a third grader always work?
- How do we know that the number $1$ is not equal to the number $-1$?
- What are the Implications of having VΩ as a model for a theory?
- Defining a Galois Field based on primitive element versus polynomial?
- Can't find the relationship between two columns of numbers. Please Help
- Is computer science a branch of mathematics?
- Is there a bijection of $\mathbb{R}^n$ with itself such that the forward map is connected but the inverse is not?
- Identification of a quadrilateral as a trapezoid, rectangle, or square
- Generator of inertia group in function field extension
Popular # Hahtags
second-order-logic
numerical-methods
puzzle
logic
probability
number-theory
winding-number
real-analysis
integration
calculus
complex-analysis
sequences-and-series
proof-writing
set-theory
functions
homotopy-theory
elementary-number-theory
ordinary-differential-equations
circles
derivatives
game-theory
definite-integrals
elementary-set-theory
limits
multivariable-calculus
geometry
algebraic-number-theory
proof-verification
partial-derivative
algebra-precalculus
Popular Questions
- What is the integral of 1/x?
- How many squares actually ARE in this picture? Is this a trick question with no right answer?
- Is a matrix multiplied with its transpose something special?
- What is the difference between independent and mutually exclusive events?
- Visually stunning math concepts which are easy to explain
- taylor series of $\ln(1+x)$?
- How to tell if a set of vectors spans a space?
- Calculus question taking derivative to find horizontal tangent line
- How to determine if a function is one-to-one?
- Determine if vectors are linearly independent
- What does it mean to have a determinant equal to zero?
- Is this Batman equation for real?
- How to find perpendicular vector to another vector?
- How to find mean and median from histogram
- How many sides does a circle have?
As with computer graphics, there are two main paths you can go: either pixel graphics or vector graphics. Now the former of the two is, in my opinion, easier to write an equation for, so I'll talk about that one here (though if people are interested I can share the formulas for vector graphics)
One thing to note is that desmos actually graphs it a little incorrectly, since it should fill in the entire rectangle, since every value between -1 and 1 should solve this function in both x and y. To fix this problem, if your using desmos, is to rewrite the function as inequality $\lfloor(|x|)\rfloor + \lfloor(|y|)\rfloor\leq1$ which will make your rectangle fully filled in. We can translate and strech by rewriting the equation like this: $\lfloor|\frac{1}{5}(x-3)|\rfloor+\lfloor|\frac{1}{3}(y-2)|\rfloor$. This is a rectangle centered at (3,2) that is 5 wide and 3 long.
.
This gives us all kinds of power to draw things. For example, we can draw parametric equations, like this $$\prod_{n=0}^{9\cdot2\pi}R\left(x,y,5\cdot\cos\left(\frac{n}{2\cdot3}\right),\sin\left(\frac{n}{3\cdot3}\right)\cdot5,\frac{1}{2},\frac{1}{2}\right)\le1$$ to get this:
. 
First, lets figure out how to draw a rectangle. A rectangle has the trait of its absolute value being less than $l_x$ on the x axis and less than $l_y$ on the y axis. By this I mean that these two things are true $|x|<l_x,|y|<l_y$. Here's the equation I wrote to check if both of these conditions are met: $\lfloor{|x|}\rfloor+\lfloor|y|\rfloor=0$. This works because if both x and y are less than one in absolute value then the floor of them is zero. This is how desmos graphs the function:
In general, the equation looks like this $$R(x,y,c_x,c_y,s_x,s_y)=\lfloor|\frac{1}{s_x}(x-c_x)|\rfloor + \lfloor|\frac{1}{s_y}(y-c_y)|\rfloor $$
The next step is combine the rectangles, which will function as pixels to the image. We want to additively combine them, so that if two rectangle overlap then they don't cancel out. Since these rectangle are equal to zero in the area that shoudl be colored in, we just multiply them together, because if any of the rectangles are zero, the entire equation will become zero. For example this equation $R(x,y,3,3,2,2)\times R(x,y,10,5,4,3)\times R(x,y,4,-5,2,2)\leq 1$ results in a graph that looks like this
Now to make this work on images, we need to do a little bit of programming. Lets first choose an image, ideally one which has well defined edges. I'm going to use this picture
What we're going to do with this program is to mark where we want to draw our rectangles by reading the pixels of the image into black and white and then deciding whether an area is dark enough to draw. Heres the program that I wrote:
This program finds all elements that dark enough and prints the location of those pixels. It will print out a bunch of numbers, and we can use these numbers to graph (don't forget to remove the trailing "," otherwise desmos will be confused) the image. Here are the final formuales. $$L=[122,123,136,137,...]$$ $$\prod_{n=1}^{L.\operatorname{length}}R\left(x,y,2\cdot\operatorname{mod}\left(L\left[n\right],w_{idth}\right),2\cdot\left(w_{idth}-\operatorname{floor}\left(\frac{L\left[n\right]}{w_{idth}}\right)\right),1,1\right)\le1$$ This does often run slowly on desmos though, so you can split the formula into different parts, here is what my graph looks like on desmos.
.