DEV Community

Cover image for Insectoid Curve
Zevan Rosser
Zevan Rosser

Posted on

Insectoid Curve

The following short article will discuss the Insectoid Curve - a parametric curve inspired by the Scarabaeus and Cornoid. I created this back in 2016 for fun.

The curve itself is a weighted average of variations on both the Cornoid and the Scarabaeus. The equation is parametric, with θ\theta as the parameter in a range from 00 to 2π2\pi .

r=bcos(2θ)acos(θ)x1=2rcos(θ+π/2)y1=atan(rsin(θ2))x2=ccos(θ)(1(2sin2(θ))y2=csin(θ)(1+(2cos2(θ))x=x1d+x2ey=y1d+y2e r = b \cos(2 \theta) - a \cos(\theta) \newline x_1 = 2|r \cos(\theta + \pi/2)| \newline y_1 = \text{atan}( r \sin(\theta 2)) \newline x_2 = c \cos(\theta) (1 - (2 \sin^2(\theta)) \newline y_2 = c \sin(\theta) (1 + (2 \cos^2(\theta)) \newline x = x_1 d + x_2 e \newline y = y_1 d + y_2 e

Values a,b,c,da,b,c,d and ee all range from 00 to 11 . In the below image these values were simply randomized:

Insectoid Plots

Note each of the above plots is actually the result of 44 randomly generated plots on top of one another and increasingly offset on the yy axis (slightly).

Interactive Version

Click the below plot - values aa through ee will be randomized.

The code here is a bit strange, something I speedcoded to quickly create responsive shapes/plots. I may revisit it some day, but for now it remains a bit of an esolang api.

Again, this is 44 plots on top of one another. To render this plot with a single layer hold your shift key and click.

The Scarabaeus and Cornoid

The original equation for the Scarabaeus curve in polar coordinates is:

r=bcos(2θ)acos(θ)r = b \cos(2 \theta) - a \cos(\theta)


...and the Cornoid in parametric form:

x=acos(θ)(12sin2(θ))y=asin(θ)(1+2cos2(θ)) x = a \cos (\theta) (1 - 2 \sin^2(\theta)) \newline y = a \sin (\theta) (1 + 2 \cos^2(\theta))

Alt Text

Quick Background

The original impetus for the creation of the Insectoid Curve was to create a curve that had features similar to an insect - specifically a beetle. After combining the Cornoid and Scarabaeus the result you see here is the result.

Discussion (0)