Sine wave between points
All  1-2  3-9

Previous
Next
 From:  bemfarmer
5043.3 In reply to 5043.1 
Such a script could probably be done fairly easily by combining the information
of the Sine script, with the Distance script,to select the two points

Integer multiples of PI would give the zero crossings...

On the other hand, you could just modify the Sine script to add the multiples of PI (?),
because the length is already selectable...

What sort of work are you doing?

EDITED: 31 Mar 2012 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:  Ditto
5043.4 In reply to 5043.2 
Hi Michael,

Thanks for that. I have seen, and played with that script. But it's not really what I am after. Your script gives a sine between A and B, I want a sine where sin(A) == 0 && sin(B) == 0. A trim won't do that, and scaling a sine to A and B would change the wavelength.

Not sure to be able to name what I am after: Modeling probably, instead of technical drawing. I need to see the curves to be able to tell if they feel right. Hence, my slider with interactive update. Impossible to key in wavelength and amplitude, scale or trim, and repeat until it is Ok.

So instead of a script where I need to key in numbers until good, I was after a scripts that is always good with visual feedback.

Thanks,
Ditto
  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:  Ditto
5043.5 In reply to 5043.3 
Hi Ben,

Yes, the multiples of Pi would do the job (of course!), but, although I understand the math, I am not a programmer :( I wouldn't know for my life where to touch Michael's script.

I am confronted to design a small line of items around the subject of "life", and I choose the sine because it is present in many ways in nature (Euler's number would be more versatile, but I am already struggling with sine).

Not sure how to explain this: I am constructing around the objects, and sine needs to fit in. When I want a sine wave between two points, I am not after the exact wavelength, but after a visually appealing sine between two ends.

Sorry if this makes no sense ..

Thanks,
Ditto

EDITED: 31 Mar 2012 by DITTO

  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
5043.6 In reply to 5043.4 
Hi Ditto, could you maybe just draw a little graph of what you want to help explain it?

> I want a sine where sin(A) == 0 && sin(B) == 0.

Ok, but the Sine function only has a value of 0 at 180 degree increments, it's 0 only at a few places, like:

(using degrees)
sin(0) = 0
sin(180) = 0
sin(360) = 0
etc...


If you want to cut the sine wave from that other plugin up at places where it crosses the 0 value, you can just draw in a horizontal line for that along y = 0 and trim with it.

Sorry I'm not getting what you are asking about, I guess I will need a bit more information and maybe a sketch or something to help me understand.

- 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
5043.7 
Hi Ditto,

Where are the two points located? Somewhere in 3D space, with x,y,z coordinates?

Or are the two points located in say the xy plane, or xz plane, or yz plane?

Which orientation should the sine wave amplitude point?
The direction of the (+) amplitude would be perpendicular to a line between the two points, and point in any 360 degree direction...

There would be a half wavelength, full wavelength, or some integer multiple, and negative mirror images...

The recent catenary2PtXYZ script hangs a catenary between two user selected points, but maintains the
y-axis for gravity.
  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
5043.8 
Hi Ditto,

Made a couple of trivial changes to Michaels Sinewave script.

1. Changed the PI multiplier for the y coordinate from 2.0 to 1.0.

2. Removed the "* numcycles" multiplier from the x coordinate.

Number 3 does not change what the revised script does, just lets the user decide upon the
number of Half sine cycles. The input is the integer number of half cycles.

3. Changed the label numcycles to numHalfcycles. Left the variable numcycles alone, because
the more changes, the more goofups. numcycles now holds the number of HALF sine waves.
It should be renamed numHalfcycles to be technically correct...

Making the amplitude negative, mirrors the sine wave with a negative start.

A slider could be added to numHalfcycles...don't really see the point. The view just becomes a "fringe" with
large values of numHalfcycles.




  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:  Ditto
5043.9 In reply to 5043.8 
Ben,

You hit the nail on its head! Thanks much! That is (mostly) what I am after, but I can work around that.

Having both points on the same plane is no problem. I will copy and rotate the sine later on.

The sliders would make the script a bit easier to handle, because I don't know in advance how many half-cycles at what amplitude I want, I change the values and look at the result until I am happy. A slider would be more direct: Instead of clearing the field, entering a number, hitting enter, simply dragging a slider or pushing Up/Down arrows would be more natural.

But again, thank you very much! Having the sine like that will allow me to continue.

Ditto
  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: All  1-2  3-9