language agnostic - Finding angles of dots to make a mechanical wave effect -


This is just for fun.

I have the following values:

  • Number of rows
  • < li> The radius of their circle (universal)

    And this is the picture that I want to achieve:

     Enter the image details here

    I think the rotation speed of each point is the same

    Update :

    Yikes! Thanks for all your answers. However, I manage to create myself, but in different patterns:

    Enter the image details here

    Argument in constructor side only:

      circle with dots (): timer (clock), angle (angle-counter 0 = angle_counter> ANGLE_STEP = 20;   

    And also (to rotate the dot):

      x = table_cos [angle] * radius; Y = -table_sin [angle] * radius; As I said in my comment that it is only raising the diagonals, so you have everything. There is a processing JS sketchpad (it is slow, you can copy it in.) Copy local processing installation to run it fast):  

    The related part is:

      ang = (xy) * scalefac + Anim; Float xpos = x * xscale + sin (ang) * cwidth / 2.0; Boat ypos = y * yscale + cos (ang) * cheute / 2.0; Arc (xpos, ypos, 4,4,0, pi * 2);   

    Enter image details here

    if Someone wants a tile version here:

    Enter image details here

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -