MoI discussion forum
MoI discussion forum

Full Version: Cycloid curve

Show messages:  1-14  15-34  35-40

From: Michael Gibson
4 Oct 2017   [#35] In reply to [#34]
No problem Tom, I'm glad that offset will work for you!

@Pilou - re: FatLines - FatLines uses curve booleans which is not really expecting to work with self intersecting curves like in this case.

- Michael
From: bemfarmer
25 Sep 2018   [#36]
Here is an update to the _CycloidInterp script, renamed to _CycloidTrochoid.

This script plots a Trochoid or Cycloid on the x axis.
A common Trochoid has the bRadius equal to the aRadius, and is a Cycloid.
Interpcurve factory is used, to avoid cusp rounding.
Rewritten by Brian McMillin, September 2018.
A Brachistochrone is an inverted Cycloid.
A Gerstner wave is a trochoidal wave.
If b>a, the trochoid is a prolate cycloid.
If b<a, the trochoid is a curtate cycloid.

Note the different behavior of the display of the ignore checkbox,between MoI3 and MoI4.
For MoI4, the three lines of text are centered with the checkbox.
For MoI3, the first line of text is horizontal to the checkbox, with the other three lines below. (A preferred look???)

Can the (vertical?) centering be changed in the MoI4 display of the .htm file?

- Brian

Script updated 9/25/2018, with Michaels input, if the 3 people who downloaded it want the update.

Edit, Only one cycle is plotted, due to cusp problem with 2+ cycles.

Attachments:
_CycloidTrochoid.zip


From: Michael Gibson
25 Sep 2018   [#37] In reply to [#36]
Hi Brian, re: checkbox positioning, it is possible to change that one checkbox's position by putting this in the head section of your _CycloidTrochoid.htm file:

code:
		<style>
			#ignore_bRadius {
				align-items:flex-start;
			}

			#ignore_bRadius .checkbutton_box {
				margin-top:0.2em;
			}
		</style>


- Michael
From: bemfarmer
25 Sep 2018   [#38] In reply to [#37]
Thank you Michael

That works.
Unfortunately, the values of aRadius and bRadius are now set to zero, in MoI4, but are ok in MoI3 :-)
?

- Brian
From: Michael Gibson
25 Sep 2018   [#39] In reply to [#38]
Hi Brian,

re:
> Unfortunately, the values of aRadius and bRadius are now set to zero, in MoI4, but are ok in MoI3 :-)

That's a bug in v4 with handling whitespace characters in the default value. If you remove the line break for the default="" attributes that should avoid the bug right now.

So where you currently have:

code:
			<tr>
				<td>aRadius</td>
				<td><input id="aRadius" class="numericinput" default="10
				" style="persist:true;"></td>
			</tr>


Remove the line break like so:

code:
			<tr>
				<td>aRadius</td>
				<td><input id="aRadius" class="numericinput" default="10" style="persist:true;"></td>
			</tr>



I'll fix it up for the next v4 beta, thank you for reporting it.

- Michael
From: bemfarmer
25 Sep 2018   [#40] In reply to [#39]
Thank you Michael.
The script is working again in MoI4, and continues to work in MoI3.

The white space was introduced unintentionally, while removing decimals, a day or so ago :-)
...5 or 6 or so decimals were causing occasional shift of the htm screen to the left, a fraction of an inch, in MoI3, but not in MoI4...

- Brian

The _CycloidTrochoid script is now updated, a few posts back.

Show messages:  1-14  15-34  35-40