Thread: How Long is a Piece of String? Clever Dood Needed!

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Code Monkey Davros's Avatar
    Join Date
    Jun 2002
    Posts
    812

    Question How Long is a Piece of String? Clever Dood Needed!

    I have a maths problem.

    My program is rendering a sine wave of the form:

    y = oy + (ay * SIN(ax * x))

    So in ASCII art it looks like :

    Code:
    y   _
    |  / \
    |     \_/
    |______x
    Here's my problem. I want to calculate the path length of the wave. Furthermore, I want to calculate the path length traversed from starting point (0, 0) to some point on the x axis.

    In otherwords, if we draw the axes on the ground using inches as our dimensions. Then laid out a piece of string in the shape of the sine wave. How long does the string need to be to reach a distince x along the x-axis from the origin?

    I believe this problem is solvable with cantenary equations, but my maths is upto scratch with these.

    Any ideas?
    Last edited by Davros; 10-18-2002 at 10:11 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Inserting a swf file in a windows application
    By face_master in forum Windows Programming
    Replies: 12
    Last Post: 05-03-2009, 11:29 AM
  2. String Class
    By BKurosawa in forum C++ Programming
    Replies: 117
    Last Post: 08-09-2007, 01:02 AM
  3. How do i un-SHA1 hash something..
    By willc0de4food in forum C Programming
    Replies: 4
    Last Post: 09-14-2005, 05:59 AM
  4. need help
    By emperor in forum C Programming
    Replies: 1
    Last Post: 03-04-2002, 12:26 PM