Exemple #1
0
 private void DrawConstellation(Graphics g, Constellation c, float cx, float cy, float scale, float markerScale)
 {
     g.DrawLine(Pens.Gray, cx + -scale, cy + -scale, cx + scale, cy + -scale);
     g.DrawLine(Pens.Gray, cx + scale, cy + -scale, cx + scale, cy + scale);
     g.DrawLine(Pens.Gray, cx + scale, cy + scale, cx + -scale, cy + scale);
     g.DrawLine(Pens.Gray, cx + -scale, cy + scale, cx + -scale, cy + -scale);
     g.DrawLine(Pens.Gray, cx, cy + -scale, cx, cy + scale);
     g.DrawLine(Pens.Gray, cx + -scale, cy, cx + scale, cy);
     foreach (Constellation.Point p in c.Points)
     {
         float x = (float)Math.Cos(p.Phase) * p.Magnitude * scale;
         float y = (float)Math.Sin(p.Phase) * p.Magnitude * scale;
         g.DrawEllipse(Pens.Aqua, cx + x - markerScale * 0.5f, cy + y - markerScale * 0.5f, markerScale, markerScale);
     }
 }
Exemple #2
0
 public QAM(Constellation constellation, int frequencies, int frameLength)
 {
     m_Constellation = constellation;
     m_NumFrequencies = frequencies;
     m_FrameLength = frameLength;
     m_FFT = new FFT(frameLength);
 }