Drawing with "Carbon Application"

Discussion in 'Mac Programming' started by basshead6949, Dec 31, 2007.

  1. basshead6949 macrumors newbie

    Joined:
    Oct 11, 2007
    #1
    Greetings all.

    I’m currently using Xcode 3.0 (although I have access to older versions) to build an embarrassingly simple drawing program for Uni. The type of project is a Carbon Application. The idea is, the user enters the frequency, amplitude and phase and the program then plots a graph of a wave. I have used the 'radio buttons' to enable the user to select the type of wave, sine, square, sawtooth and triangle. My equations are correct and produce the first three waves perfectly, with one problem. Xcode is only drawing the wave with individual pixels. This means that the higher the frequency/amplitude, the more spread out these pixels are, which eventually renders the wave illegible. What I need is a way of 'connecting the dots'! I have notes on how to draw simple squares and cubes so I understand the concept of drawing lines with Xcode but I have only been taught how to use the "move to" and "line to" statements. When the user is effectively the one entering the coordinates I don't see how it is possible to do it this way.

    I eternally apologise for my ignorance, I'm just a simple Music Tech student! If anyone can help with this it would be very much appreciated, if you have any problems understanding the question please ask.

    Thanks in advance

    D.Fayers
     
  2. Catfish_Man macrumors 68030

    Catfish_Man

    Joined:
    Sep 13, 2001
    Location:
    Portland, OR
    #2

Share This Page