Restricting Values in Desmos error (for a complicated parametric point).

Click For Summary
SUMMARY

The discussion centers on graphing a rose curve in Desmos with specific restrictions on the radial distance, requiring values between r=3.45 and r=9. The user encountered an error when attempting to apply curly bracket restrictions directly to the parametric point. A solution was proposed involving splitting the domain into ten segments and using specific trigonometric inequalities to define the valid ranges for the parameter t. The discussion also introduced the use of TikZ for creating similar plots, emphasizing the need for understanding trigonometric functions and their graphical representations.

PREREQUISITES
  • Understanding of parametric equations in Desmos
  • Knowledge of trigonometric functions and their properties
  • Familiarity with TikZ for graphical representation
  • Basic skills in manipulating inequalities
NEXT STEPS
  • Learn how to implement parametric equations in Desmos effectively
  • Study the properties of trigonometric functions, particularly sine and arcsine
  • Explore advanced TikZ techniques for creating complex plots
  • Investigate methods for segmenting domains in parametric plotting
USEFUL FOR

Mathematicians, educators, and students interested in advanced graphing techniques, particularly those using Desmos and TikZ for visualizing parametric equations and trigonometric functions.

Plasma2
Messages
8
Reaction score
0
Hello. I have graphed a rose curve on Desmos using a parametric point, the equation looking like this:

View attachment 7923

However, I want the graph to be limited so that only values within the circle r=3.45 and r=9 are shown. I have tried using the curly brackets {3.45 <= r <= 9}, however this returns an error "You cannot multiply a point by a number". I have spent several hours searching for a fix to this, but to no avail. The built-in "t" restriction does not restrict the graph in this way, rather it deletes parts of it if the range is not at least 4. If anyone can help me restrict this function in such a way as to only show values within those circles, that would be very kind. Thank you!
 

Attachments

  • starhelp.PNG
    starhelp.PNG
    14.3 KB · Views: 196
Physics news on Phys.org
Plasma said:
Hello. I have graphed a rose curve on Desmos using a parametric point, the equation looking like this:

However, I want the graph to be limited so that only values within the circle r=3.45 and r=9 are shown. I have tried using the curly brackets {3.45 <= r <= 9}, however this returns an error "You cannot multiply a point by a number". I have spent several hours searching for a fix to this, but to no avail. The built-in "t" restriction does not restrict the graph in this way, rather it deletes parts of it if the range is not at least 4. If anyone can help me restrict this function in such a way as to only show values within those circles, that would be very kind. Thank you!

Hi Plasma, welcome to MHB! (Wave)

I think we need to split up the domain into 10 pieces to do it in Desmos.
That is, we need:
$$\frac{2\pi}{5}M+\arcsin\frac {2.8}{9} < t < \frac{2\pi}{5}M+\arcsin\frac {2.8}{3.45}$$
and:
$$\frac{2\pi}{5}M+\pi-\arcsin\frac {2.8}{3.45} < t < \frac{2\pi}{5}M+\pi -\arcsin\frac {2.8}{9}$$
We can do it in Desmos by for instance duplicating the formula 10 times with different restrictions on $t$.
At this time I don't see another way to do it more compactly with Desmos.

Alternatively we can do it here, on this website, directly with TikZ:
\begin{tikzpicture}[scale=0.3, ultra thick, red]
\foreach \M in {0,1,2,3,4} {
\draw[domain={72 * \M + asin(2.8 / 9)}:{72 * \M + asin(2.8 / 3.45)}, variable=\t]
plot ({\t}:{2.8 / sin(\t - 72 * \M)});
\draw[domain={72 * \M + 180 - asin(2.8 / 3.45)}:{72 * \M + 180 - asin(2.8 / 9)}, variable=\t]
plot ({\t}:{2.8 / sin(\t - 72 * \M)});
}
\end{tikzpicture}
[latexs]\begin{tikzpicture}[scale=0.3, ultra thick, red]
\foreach \M in {0,1,2,3,4} {
\draw[domain={72 * \M + asin(2.8 / 9)}:{72 * \M + asin(2.8 / 3.45)}, variable=\t]
plot ({\t}:{2.8 / sin(\t - 72 * \M)});
\draw[domain={72 * \M + 180 - asin(2.8 / 3.45)}:{72 * \M + 180 - asin(2.8 / 9)}, variable=\t]
plot ({\t}:{2.8 / sin(\t - 72 * \M)});
}
\end{tikzpicture}[/latexs]
Since TikZ works with degrees by default, I've converted your formula to use degrees, and I've used polar notation for the points.
 
I like Serena said:
Hi Plasma, welcome to MHB! (Wave)

I think we need to split up the domain into 10 pieces to do it in Desmos.
That is, we need:
$$\frac{2\pi}{5}M+\arcsin\frac {2.8}{9} < t < \frac{2\pi}{5}M+\arcsin\frac {2.8}{3.45}$$
and:
$$\frac{2\pi}{5}M+\pi-\arcsin\frac {2.8}{3.45} < t < \frac{2\pi}{5}M+\pi -\arcsin\frac {2.8}{9}$$
We can do it in Desmos by for instance duplicating the formula 10 times with different restrictions on $t$.
At this time I don't see another way to do it more compactly with Desmos.

Alternatively we can do it here, on this website, directly with TikZ:
\begin{tikzpicture}[scale=0.3, ultra thick, red]
\foreach \M in {0,1,2,3,4} {
\draw[domain={72 * \M + asin(2.8 / 9)}:{72 * \M + asin(2.8 / 3.45)}, variable=\t]
plot ({\t}:{2.8 / sin(\t - 72 * \M)});
\draw[domain={72 * \M + 180 - asin(2.8 / 3.45)}:{72 * \M + 180 - asin(2.8 / 9)}, variable=\t]
plot ({\t}:{2.8 / sin(\t - 72 * \M)});
}
\end{tikzpicture}
[latexs]\begin{tikzpicture}[scale=0.3, ultra thick, red]
\foreach \M in {0,1,2,3,4} {
\draw[domain={72 * \M + asin(2.8 / 9)}:{72 * \M + asin(2.8 / 3.45)}, variable=\t]
plot ({\t}:{2.8 / sin(\t - 72 * \M)});
\draw[domain={72 * \M + 180 - asin(2.8 / 3.45)}:{72 * \M + 180 - asin(2.8 / 9)}, variable=\t]
plot ({\t}:{2.8 / sin(\t - 72 * \M)});
}
\end{tikzpicture}[/latexs]
Since TikZ works with degrees by default, I've converted your formula to use degrees, and I've used polar notation for the points.

Thank you so much! I don't want to ask too much, since you've already helped me tremendously, but is there any way you can sort of explain how you got those restrictions / how to use TikZ for multiple equations? What I'm trying to accomplish is plotting several "stars" and creating a constellation using a graphing software. Otherwise you've been a lifesaver.
 
Last edited:
Plasma said:
Thank you so much! I don't want to ask too much, since you've already helped me tremendously, but is there any way you can sort of explain how you got those restrictions / how to use TikZ for multiple equations? What I'm trying to accomplish is plotting several "stars" and creating a constellation using a graphing software. Otherwise you've been a lifesaver.

No problem at all.

You have:
$$
\mathbf r = \left(\frac{2.8\cos t}{\sin(t-\frac{2\pi}5M)}, \frac{2.8\sin t}{\sin(t-\frac{2\pi}5M)} \right)
= \frac {2.8} {\sin(t-\frac{2\pi}5M)}\left(\cos t, \sin t \right)
$$
Your formula means that the magnitude of $\mathbf r$ is:
$$r = |\mathbf r| = \frac{2.8}{\left|\sin(t-\frac{2\pi}5M)\right|}$$
And we want $3.45 < r < 9$, so let's solve:
$$
3.45 < \frac{2.8}{\sin(t-\frac{2\pi}5M)} < 9
\quad\Rightarrow\quad \frac{2.8}{9} < \sin\left(t-\frac{2\pi}5M\right) < \frac{2.8}{3.45} \\
\quad\Rightarrow\quad \arcsin\frac{2.8}{9} < t-\frac{2\pi}5M < \arcsin\frac{2.8}{3.45}
\quad \lor\quad \pi - \arcsin\frac{2.8}{3} < t-\frac{2\pi}5M < \pi - \arcsin\frac{2.8}{9} \\
\quad\Rightarrow\quad \frac{2\pi}5M + \arcsin\frac{2.8}{9} < t < \frac{2\pi}5M + \arcsin\frac{2.8}{3.45}
\quad\lor\quad \frac{2\pi}5M + \pi - \arcsin\frac{2.8}{3} < t < \frac{2\pi}5M + \pi - \arcsin\frac{2.8}{9}
$$
To be fair, I've left out some intermediate steps.
After all, I have no idea what your level of understanding of trigonometry is.
Either way, please let us know if any of these steps are unclear.Btw, to create a 5-pointed star constellation with TikZ, we can do:
\begin{tikzpicture}
\usetikzlibrary{patterns}
\draw[pattern=fivepointed stars] (0,0) rectangle (3,3);
\end{tikzpicture}
[latexs]\begin{tikzpicture}
\usetikzlibrary{patterns}
\draw[pattern=fivepointed stars] (0,0) rectangle (3,3);
\end{tikzpicture}[/latexs]
 
I like Serena said:
No problem at all.

You have:
$$
\mathbf r = \left(\frac{2.8\cos t}{\sin(t-\frac{2\pi}5M)}, \frac{2.8\sin t}{\sin(t-\frac{2\pi}5M)} \right)
= \frac {2.8} {\sin(t-\frac{2\pi}5M)}\left(\cos t, \sin t \right)
$$
Your formula means that the magnitude of $\mathbf r$ is:
$$r = |\mathbf r| = \frac{2.8}{\left|\sin(t-\frac{2\pi}5M)\right|}$$
And we want $3.45 < r < 9$, so let's solve:
$$
3.45 < \frac{2.8}{\sin(t-\frac{2\pi}5M)} < 9
\quad\Rightarrow\quad \frac{2.8}{9} < \sin\left(t-\frac{2\pi}5M\right) < \frac{2.8}{3.45} \\
\quad\Rightarrow\quad \arcsin\frac{2.8}{9} < t-\frac{2\pi}5M < \arcsin\frac{2.8}{3.45}
\quad \lor\quad \pi - \arcsin\frac{2.8}{3} < t-\frac{2\pi}5M < \pi - \arcsin\frac{2.8}{9} \\
\quad\Rightarrow\quad \frac{2\pi}5M + \arcsin\frac{2.8}{9} < t < \frac{2\pi}5M + \arcsin\frac{2.8}{3.45}
\quad\lor\quad \frac{2\pi}5M + \pi - \arcsin\frac{2.8}{3} < t < \frac{2\pi}5M + \pi - \arcsin\frac{2.8}{9}
$$
To be fair, I've left out some intermediate steps.
After all, I have no idea what your level of understanding of trigonometry is.
Either way, please let us know if any of these steps are unclear.Btw, to create a 5-pointed star constellation with TikZ, we can do:
\begin{tikzpicture}
\usetikzlibrary{patterns}
\draw[pattern=fivepointed stars] (0,0) rectangle (3,3);
\end{tikzpicture}
[latexs]\begin{tikzpicture}
\usetikzlibrary{patterns}
\draw[pattern=fivepointed stars] (0,0) rectangle (3,3);
\end{tikzpicture}[/latexs]

This makes sense to me, other than one small thing. I know it's necessary to have two restrictions, and I understand how you got the first one, but how did you get the second one? Other than that everything else works beautifully in Desmos. Truly, thank you :)
 
Plasma said:
This makes sense to me, other than one small thing. I know it's necessary to have two restrictions, and I understand how you got the first one, but how did you get the second one? Other than that everything else works beautifully in Desmos. Truly, thank you :)

What do you mean by 'the 2nd one'?

I'm guessing you mean $\sin x=a \Rightarrow x=\arcsin a \lor x =\pi-\arcsin a$?
If that's the case, it follows from using the so called unit circle.
\begin{tikzpicture}[scale=3]
\draw circle (1);
\draw (-1.2,0) -- (1.2,0);
\draw (0,-1.2) -- (0,1.2);
\draw (0,0) -- node[above left] {1} (.86,0.5) -- (0,0.5) node[above right] {$a=\sin x$} -- (-.86,0.5) -- (0,0);
\node at (10:0.3) {$x$};
\node at ({180-10}:0.3) {$\pi-x$};
\end{tikzpicture}
That is, the solution to $\sin x =a$ is $x=\arcsin a \lor x =\pi-\arcsin a$ assuming $0\le x <2\pi$.
After all, there are 2 angles that yield the same sine.
 

Similar threads

  • · Replies 6 ·
Replies
6
Views
5K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 24 ·
Replies
24
Views
4K
Replies
6
Views
5K
  • · Replies 2 ·
Replies
2
Views
1K
Replies
20
Views
4K
  • · Replies 15 ·
Replies
15
Views
4K
  • · Replies 8 ·
Replies
8
Views
5K
Replies
12
Views
2K