To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.off-topic.geekOpen lugnet.off-topic.geek in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Off-Topic / Geek / 2683
2682  |  2684
Subject: 
Re: Off on a tangent (or a sine, anyway)
Newsgroups: 
lugnet.off-topic.geek
Date: 
Tue, 16 Jan 2001 23:32:33 GMT
Viewed: 
125 times
  
and the low points occur along y=60.  I don't mean to be difficult, but I'm
trying to get it going from (0,180) to (162,60) in a single high:low cycle
(whatever the term).
Well, that changes everything, yes.

I've messed around a little further, and the equation:

  y=60cos(x/51.5)+120

gets visually pretty close to what I'm looking for.  Is there a more logical
method than the try-and-try-again way I've used so far?
If cos(x/51.5) is close, then you are in radians (Shiri already correctly
explained where the 1.11 came from, and she's correct if your wavelength of
324 is in degrees. If it's in radians then you have to scale it:

cos freq (degrees) = 360 degrees / wavelength

cos freq (radians) = 2*pi / wavelength

which is 6.2831853... / 324 which is 1/51.5662, which is where your 51.5
came from (324 / 2 pi)

and if yMax is 180 and yMin is 60 then your amplitude is 60 and your
baseline is 60,

y = Amplitude * cos(freq * x) + Baseline

y = 60 cos (x/51.56620) + 60

(sin is the same as cos but offset by pi / 2)

so y = 60 sin ((x/51.5662) + pi /2) + 60 would also work

Mark W.

Note that it sounds like you want your x axis to be in degrees (where 1.11 x
instead of x/51.5662 would work) yet you're working in radians (pi radians =
180 degrees) the point being that if you want to scale your x axis you
should be certain whether you're talking about 324 degrees or 324 radians.



Message is in Reply To:
  Re: Off on a tangent (or a sine, anyway)
 
(...) Doh! I was trying to be so careful! I thought amplitude was the "height" from high to low--is it actually half that? At any rate, I meant to write the min occurs at y=60, so that the high points occur along the line y=180 and the low points (...) (24 years ago, 16-Jan-01, to lugnet.off-topic.geek)

7 Messages in This Thread:


Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR