Results 1 to 7 of 7

Thread: Sine curve (RESOLVED)

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Dec 2003
    Location
    Bristol, England (but heart is in Virginia)
    Posts
    2,949

    Resolved Sine curve (RESOLVED)

    Hi,

    I don't suppose any one has a programme that could draw me a sine curve from 0 degrees to 90 degrees starting at 3cm from the fulcrum please??? It is just a one off item I need and although I can work out the figures, I am having great difficulty in marking out the template. I need to make a cam of that shape.
    Last edited by taxes; Aug 17th, 2005 at 05:59 AM. Reason: resolved
    Taxes
    The more I learn about VB.NET the more I like dBaseIII Plus

    The foregoing, whilst believed to be correct, is given without guarantee as to it's accuracy and entirely without recourse. You are required to decide for yourself whether or not it is suitable for your purposes and no liability for loss of any nature can be entertained.

  2. #2
    vbuggy krtxmrtz's Avatar
    Join Date
    May 2002
    Location
    In a probability cloud
    Posts
    5,573

    Re: Sine curve

    What exactly is the fulcrum of a sine curve?
    Lottery is a tax on people who are bad at maths
    If only mosquitoes sucked fat instead of blood...
    To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)

  3. #3

    Thread Starter
    PowerPoster
    Join Date
    Dec 2003
    Location
    Bristol, England (but heart is in Virginia)
    Posts
    2,949

    Re: Sine curve

    Hi,

    I have probably used the wrong terms.

    I can make the calculations arithmetically, so I will probably have to construct a graph based on those calculations.

    The X axis will be the size of the angle and the Y axis will plot the sine of that angle multiplied by 30 mm

    I had hoped that someone in a mathematics discipline had a programme which would do that.

    Thanks for your response & my apologies for my confusion.
    Taxes
    The more I learn about VB.NET the more I like dBaseIII Plus

    The foregoing, whilst believed to be correct, is given without guarantee as to it's accuracy and entirely without recourse. You are required to decide for yourself whether or not it is suitable for your purposes and no liability for loss of any nature can be entertained.

  4. #4
    vbuggy krtxmrtz's Avatar
    Join Date
    May 2002
    Location
    In a probability cloud
    Posts
    5,573

    Re: Sine curve

    This should get you started:
    VB Code:
    1. 'Place a picturebox called p1 on a form
    2. Option Explicit
    3. Const Pi = 3.141593
    4. Const nP = 2    'Number of periods to be plotted
    5. Private Sub Form_Click()
    6.     PlotSine
    7. End Sub
    8. Private Sub PlotSine()
    9.     Dim x As Single, angle As Single, dx As Single
    10.  
    11.     p1.Scale (-nP * Pi, 1)-(nP * Pi, -1)
    12.     dx = 2 * nP * Pi / 500
    13.     p1.CurrentX = -nP * Pi
    14.     p1.CurrentY = 0
    15.     For x = -nP * 180 To nP * 180 Step dx
    16.         angle = x * Pi / 180
    17.         p1.Line -(x, Sin(x))
    18.     Next
    19. End Sub
    Last edited by krtxmrtz; Aug 17th, 2005 at 05:32 AM.
    Lottery is a tax on people who are bad at maths
    If only mosquitoes sucked fat instead of blood...
    To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)

  5. #5

    Thread Starter
    PowerPoster
    Join Date
    Dec 2003
    Location
    Bristol, England (but heart is in Virginia)
    Posts
    2,949

    Re: Sine curve

    Hi,

    Many thanks.

    I'm trying it shortly.
    Taxes
    The more I learn about VB.NET the more I like dBaseIII Plus

    The foregoing, whilst believed to be correct, is given without guarantee as to it's accuracy and entirely without recourse. You are required to decide for yourself whether or not it is suitable for your purposes and no liability for loss of any nature can be entertained.

  6. #6
    Frenzied Member yrwyddfa's Avatar
    Join Date
    Aug 2001
    Location
    England
    Posts
    1,253

    Re: Sine curve

    I'm assuming that you need the 30mm to be exact when printed? If you want this then you'll need to use PCL, and possible, a fixed coordinate system (one that maps, by a known and fixed ratio, pixels to DPI)
    "As far as the laws of mathematics refer to reality, they are not certain; and as far as they are certain, they do not refer to reality." - Albert Einstein

    It's turtles! And it's all the way down

  7. #7

    Thread Starter
    PowerPoster
    Join Date
    Dec 2003
    Location
    Bristol, England (but heart is in Virginia)
    Posts
    2,949

    Re: Sine curve

    Hi krtxmrtx,

    That's it!!!!! Many thanks (For anyone else looking, the code is VB6)
    Taxes
    The more I learn about VB.NET the more I like dBaseIII Plus

    The foregoing, whilst believed to be correct, is given without guarantee as to it's accuracy and entirely without recourse. You are required to decide for yourself whether or not it is suitable for your purposes and no liability for loss of any nature can be entertained.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width