Clothoid 2 point curve script
 1-20  21-35

Previous
Next
 From:  Mauro (M-DYNAMICS)
5878.21 In reply to 5878.20 
..French Pride.. ;) :)
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  bemfarmer
5878.22 In reply to 5878.20 
Oui :-)
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  bemfarmer
5878.23 
After a long hiatus, spent a few hours adding two sliders for the start and end angles of the clothoid.
It only took a few minutes to add the sliders, but a lot longer to get everything working more or less properly,
due to limited programming skills and limited understanding.
Much of the code is in the htm file, as per Michaels post.

The MoI3 version of Blend command was used for the basic pattern, but had to modify it per Michaels help of many months ago, since
the sliders do not have a "clothoid factory" to work with. The sliders work "better" in Blend command, (in my opinion).

Is there some way to make the clothoid sliders update interactively, not just when the mouse button is released?

Angles can also be typed into the boxes.

The MoI3 version does not quite work in MoI2. MoI2 hangs up for awhile, but then permits exit from MoI2.
The MoI2 version of Blend appears to have a different line in the slider code.
Including this difference allowed a version that works in MoI2, and it also worked in MoI3.

Attached a MoI3 version, and also a MoI2 version, both with limited testing

Edit August 2, 2013...See August2 post for updated onmousemovevaluechange sliders for MoI3August1Beta.

EDITED: 3 Aug 2013 by BEMFARMER


  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
5878.24 In reply to 5878.23 
Hi Brian,

> Is there some way to make the clothoid sliders update interactively, not just when the mouse button is released?

I'm sorry there's not any way to do that currently, at the moment the interactive slider stuff is only set to work through the property binding mechanism so it will only work for binding to a geometry factory input, not to trigger a script event for the interactive movement.

I'll see about putting in an option for the slider for generating continuous events for every mouse move.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  bemfarmer
5878.25 In reply to 5878.24 
Hi Michael,

Thank you.

- Brian
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
5878.26 In reply to 5878.25 
Hi Brian, for the next v3 beta I've updated the slider control so it will fire an onmousemovevaluechange="...." script event for every mouse move, so you'll be able to put in a script handler for that event instead of just onvaluechange="" if you want to get more interactive events.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  bemfarmer
5878.27 In reply to 5878.26 
Thank you Michael.

I wonder if it will be useful for anything else...?

-Brian
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  bemfarmer
5878.28 In reply to 5878.26 
Attached improved onmousemove sliders for interactively adjusting clothoid start and end angles by slider, for MoI3BetaAugust1_2013.

Thanks to Michael for updating slider control.

-Brian

Edit: See next post for script files with big sliders

EDITED: 5 Aug 2013 by BEMFARMER

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  bemfarmer
5878.29 In reply to 5878.28 
Studied a bit of HTML code, and updated the htm file to display Big sliders.
Noticed a bit of brief shakiness of the curves.
-Brian
ps Discovered a re-write of the source paper at http://arxiv.org/pdf/1305.6644.pdf.
Have to study it to see if the Math is any more comprehensible.

EDITED: 5 Aug 2013 by BEMFARMER


  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Frenchy Pilou (PILOU)
5878.30 
here maybe for the yellow curve that is 30° & 90°
(a Clothoïd curve is slightly different than a Blend curve or Conic curve)

But does it possible to have directly the optimum result (yellow) without the sliders ?






Ps Have you a site where are all your Moi Scripts ?

EDITED: 14 Oct 2013 by PILOU

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  bemfarmer
5878.31 In reply to 5878.30 
Hi Pilou,

The problem is with getting and preserving the tangents at the beginning and end.
I am unable to extract the two tangents by clicking on the curve(s), using scripts.
(This is do-able using Nurbs equations, for an expert, for example the blend command.)
So instead, helper tangent lines are used.
A few months ago I did a script to utilize two helper line segments, at the beginning and end, which are
placed manually, as tangents. However, using the interpcurve or curve factories, to draw the clothoid, resulted
in a clothoid curve which were close to being tangent, but were not quite tangent, so the code was never polished up.
I may revisit it sometime. I do not want to post "sloppy" code, and try to polish it up, at least somewhat...

When I am tracing curve drawings using an image, Blend often works well. Sometimes a clothoid is very helpful, used to
help establish a curve, which blend can alter.

(Note that the factory curves are close approximations to such curves as clothoids, catenaries, sinewaves, etc.)

- Brian

Edit: I have not made a website yet :-)
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Frenchy Pilou (PILOU)
5878.32 In reply to 5878.31 
thx for the infos!
---
Pilou
Is beautiful that please without concept!
My Gallery
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Frenchy Pilou (PILOU)
5878.33 
...
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  bemfarmer
5878.34 
This is the current most recent version of Clothoid2pt script, with two sliders.
Got rid of negative point numbers.
Added Max Smirnov method of reducing slider flicker. (per ArchimedeanSpiral discussion)
Added Max Smirnov method of clicking on slider label to reset slider to midpoint.

(Hopefully there is not some configuration which does not work.)
The script still has lots of comments, which could be removed to a text file...

- Brian

Maybe Moi version 4 could have a method to make available endpoint tangents of a curve?
Attachments:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  Michael Gibson
5878.35 In reply to 5878.34 
Hi Brian,

> Maybe Moi version 4 could have a method to make available
> endpoint tangents of a curve?

Yes, I would like to add some curve evaluation mechanisms to be available to scripts in v4.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All

 

 
 
Show messages:  1-20  21-35