Author Topic: Hypotrochoid script  (Read 3603 times)

Offline BaNoBi

  • Droid
  • **
  • Posts: 51
    • View Profile
Hypotrochoid script
« on: January 22, 2015, 14:18:33 pm »
I developed a new script for draw a hypotrochoid.

Definition: In geometry, a hypocycloid is a special plane curve generated by the trace of a fixed point on a small circle that rolls within a larger circle. It is comparable to the cycloid but instead of the circle rolling along a line, it rolls within a circle.

Online hypotrochoid creation/demonstration: http://www.geogebratube.org/student/m112334

You can use this script with the "Custom script plugin" to get the parameters for draw the hypotrochoid.



Hypocycloid Examples:

Please let me know of any bugs, or issues, or useful improvements.
« Last Edit: January 24, 2015, 20:41:55 pm by BaNoBi »

Offline lloydsp

  • CNC Jedi
  • *****
  • Posts: 8331
    • View Profile
Re: Hypotrochoid script
« Reply #1 on: January 22, 2015, 14:26:06 pm »
Wow!  That's not only a neat script, I have an (almost) immediate use for it -- next job on my docket.

I don't have the time this a.m. to use it... but will it also do the more generalized hypotrochoids (not only hypocycloids)?

Lloyd
« Last Edit: January 22, 2015, 14:32:36 pm by lloydsp »
"Pyro for Fun and Profit for More Than Fifty Years"

Offline dave benson

  • CNC Jedi
  • *****
  • Posts: 1345
    • View Profile
Re: Hypotrochoid script
« Reply #2 on: January 23, 2015, 01:05:08 am »
HI Vasco
Somehow I completely missed the Custom Script Plugin thread and was wondering what this did
->Dim num_segments = Integer.Parse(StepsLength) Learnt something new.
Nice work!
Dave

Offline BaNoBi

  • Droid
  • **
  • Posts: 51
    • View Profile
Re: Hypotrochoid script
« Reply #3 on: January 23, 2015, 08:45:07 am »
Hi Dave,

The Custom Script Plugin is a tool for help you to run simple script or scripts with input.

When runs the custom script plugin for compile this script, the plugin goes ask you the value for BigR, r, h, XCenter, YCenter and StepsLength. Like this:


This code Integer.Parse(StepsLength) is used for convert a string to a integer value. http://www.dotnetperls.com/integer-parse-vbnet

Thanks,