Changeset 9288


Ignore:
Timestamp:
2017-07-31 20:43:44 (2 years ago)
Author:
mianhayr
Message:

neliö squeezaa oikein

Location:
2017/30/MikkoH/Sq
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • 2017/30/MikkoH/Sq/Sq/Sq/Sq.cs

    r9287 r9288  
    66{ 
    77    List<Vector> ps, crc; 
    8     int dist = 10, pts = 150, mag = 100, minmag = 1, maxmag = 300, magc = 4, minrad = 1, maxrad = 100; 
     8    int dist = 5, pts = 150, mag = 100, minmag = 10, maxmag = 300, magc = 4, minrad = 1, maxrad = 100; 
    99    double rad = 50, radc = 0.01; 
    1010 
     
    5656        { 
    5757            c.DrawLine(ps[i % ps.Count], ps[(i + ps.Count / 4) % ps.Count]); 
    58             ps[i] = Vector.FromLengthAndAngle(ps[i].Magnitude + magc, ps[i].Angle); 
    59             if (ps[i].Magnitude < minmag || ps[i].Magnitude > maxmag) 
    60                 magc = -magc; 
     58            ps[i] = Vector.FromLengthAndAngle(ps[i].Magnitude + magc, ps[i].Angle);                      
    6159        } 
     60 
     61        // checks if squeeze direction should be reversed 
     62        // merging this to the above loop will fuck everything up 
     63        for (int i = 0; i < ps.Count; i++) 
     64            if (ps[i].Magnitude < minmag || ps[i].Magnitude > maxmag) { magc = -magc; break; } 
    6265 
    6366        c.BrushColor = Color.Blue; 
Note: See TracChangeset for help on using the changeset viewer.