Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Circle

Comments in 'Plugin Development' started by Primus, Jul 19, 2015.

  1. Legoboy0215
    Offline

    Legoboy0215 Notable Member

    Joined:
    Nov 1, 2014
    Posts:
    1,724
    Minecraft User:
    Legoboy0215
    Understand what is sin and cos. Anyone can give me a breif exmple or explanation ?
  2. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    You mean you want to know what sin and cos mean? Google.
  3. PixelGuy75
    Offline

    PixelGuy75 Notable Member Plugin Developer

    Joined:
    Feb 9, 2014
    Posts:
    316
    Plugins:
    2
    Minecraft User:
    PixelGuy75
    You didn't learn that in math?
  4. Legoboy0215
    Offline

    Legoboy0215 Notable Member

    Joined:
    Nov 1, 2014
    Posts:
    1,724
    Minecraft User:
    Legoboy0215
    When would I learn that?
    jojoe77777 likes this.
  5. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    In Hong Kong, junior secondary 2, generally at 13 years old.


    It is actually pretty simple. Look at this diagram:
    20151004121653c71c26c6b4935f27.jpg
    This basically explains what sin cos and tan are.

    Now, let's go more advanced. Look at this circle:

    20151004123730c71c26c6b4935f27.jpg
    It appears the text is partially hidden. So:


    In my code, I additionally added a Y increase along the loop, so as θ increases (sin 0 = sin 360°), the height of the particle also increases. So it becomes like this: (example)
    Particle A - 1 block from center at angle 0°
    Particle B - 1 block from center at angle 45°, then brought 0.5 meter higher
    Particle C - 1 block from center at angle 90°, then brought 1 meter higher
    Particle D - 1 block from center at angle 135°, then brought 1.5 meters higher

    Mind leaving a like if you find this interesting or helpful :)
    Last edited: Oct 4, 2015
    Legoboy0215 likes this.
  6. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Ignore the underlines in the images. It seems to be a bug from QuickMemo+/Google Keyboard.
  7. Legoboy0215
    Offline

    Legoboy0215 Notable Member

    Joined:
    Nov 1, 2014
    Posts:
    1,724
    Minecraft User:
    Legoboy0215
    But I relly don't understand that. But after @PEMapModder's post, I kinda start seeing how it works. I will google it :)
    Last edited: Oct 4, 2015
    PEMapModder likes this.
  8. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Indeed, but I remember that I never understood web definitions of those trigonometric functions until a human taught me in a simple way.
    Legoboy0215 likes this.
  9. Creeperface
    Offline

    Creeperface Notable Member Plugin Developer

    Joined:
    Nov 8, 2014
    Posts:
    1,346
    Plugins:
    4
    Minecraft User:
    CreeperFace
    I learned only goniometry (sin, cos, tam) so i know what these functions do but i think i can't use them in 3D :D
  10. Kripak
    Offline

    Kripak New Member

    Joined:
    Jul 17, 2015
    Posts:
    45
    Minecraft User:
    Kripak
    In Russia sin, cos on the geometry are in the ninth grade. I don't understand these formulas :(
    So i don't understand use these functions.
  11. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Draw a plane in your 3D, then it becomes a 2D.
  12. tigerza118
    Offline

    tigerza118 Active Member

    Joined:
    Jan 31, 2015
    Posts:
    100
    Minecraft User:
    tigerza117
    from plugin Firework
    PHP:
    $mx mt_rand(-$size$size) / 5;
                
    $my mt_rand(-$size+1$size+1) / 5;
                
    $mz mt_rand(-$size$size) / 5;
                
    $motion = new Vector3($mx$my$mz);

Share This Page

Advertisement