Ask Your Question

Slider for fractions of pi

asked 2019-08-21 23:31:23 +0200

Ingo gravatar image

I'd like to have in @interact a slider for (0,2pi) with stepsize 0.05pi that shows as label $\alpha$ and the current value only in the format $x*\pi$

edit retag flag offensive close merge delete


So make a slider from 0 to 2 with step size 0.05 and then multiply that x by pi. Did you have some trouble doing that? What did you try?

Iguananaut gravatar imageIguananaut ( 2019-08-22 22:43:47 +0200 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2019-08-23 10:27:13 +0200

Emmanuel Charpentier gravatar image

Wouldn't a slider for $x_r\in\left[0~1\right]$ and a label reporting "\alpha = 2\pi{}".format(x)do the job ? Of course, in the computation, you'd have to use $\alpha=x_r\cdot2\pi$. So what ?

edit flag offensive delete link more


The current value from the sliderr is displayed to the right of the sliderr - that would show the value of x_r, but I should like to see there that value augmented by $\cdot2\cdot \pi$.

Ingo gravatar imageIngo ( 2019-08-25 23:38:56 +0200 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2019-08-21 23:31:23 +0200

Seen: 50 times

Last updated: Aug 23 '19