Create paramatric shape wihtout 'dents'

53 Views Asked by At

I am plotting a shape with the following equation $$\left\{ \begin{array}{c} x=r_{in} \cos(4 t)+r_{out} \cos(t)\\ y=r_{in} \sin(4 t)+r_{out} \sin( t) \end{array} \right. $$

Given various parameters for $r_{in}$ and $r_{out}$ this will give a 'smooth' shape or a 'dented' shape (see below, I don't know how to scale images down...). In other words, in some cases a line tangential to the shape will intersect the shape, in some cases not. I would like the 'smooth' version, but it seems silly to just use trial-and-error to determine the $r_{in}$ and $r_{out}$ values (or ratio).

I figured that for this to be the case, I would need the acceleration to be always negative (or zero) in the radial direction.

Determining the acceleration is easy,

$$\left\{ \begin{array}{c} \ddot{x}=-16\ r_{in} \cos(4 t)-r_{out} \cos(t)\\ \ddot{y}=-16\ r_{in} \sin(4 t)-r_{out} \sin( t) \end{array} \right. $$ But now how do I 'extract' the radial component so I can say create and solve the inequality $$\vec{a}_{r}(t)<0\ \forall\ t$$

Or is there a much easier way I'm overlooking?

smooth

dented

2

There are 2 best solutions below

0
On

A little bit of playing shows that $r_{in}$ and $r_{out}$ are not independent.

"Sharp" corners occur at the point when we change from a curve that intersects itself to one that doesn't. Whether you want those solutions is up to you, but it will be a matter of including equality in an inequation (or not).

We get a curve which intersects itself when there exist $s,t$ both in the half-open interval $(0, 2\pi)$ such that $s \ne t$ and $x(s) = x(t)$ and $y(s)= y(t)$. Thus we have two equations, and given a value of $t$ and a value of $r_in$ we can determine values of $s$ and $r_out$ that give solutions.

We want the complement to such a set of solutions.

0
On

It looks like you want the acceleration to be to the left of the direction of motion (or in the same direction) at all times as you go counterclockwise around the origin. That is, taking $(\dot{x},\dot{y})$ as the velocity vector and $(\ddot{x},\ddot{y})$ as the acceleration vector, $$\ddot{x}\dot{y} - \dot{x}\ddot{y} \leq 0.$$