Lines in a Hexagon

Discussion in 'Spigot Plugin Development' started by Proximyst, Jun 24, 2016.

  1. Hii!
    So, I made another accidental shape, but I had already planned it to be added so why not.
    It's a hexagon.

    I currently use this code:
    Code (Java):
    package ml.proximyst.animations.animations;

    import org.bukkit.Effect;
    import org.bukkit.Location;

    public class Hexagon extends Animation
        public Hexagon(int id)

        public void execute()
            for (double i = 0; i < Math.toRadians(360); i += Math.toRadians(360) / 3)
                double sin = getRadius(Math.sin(i));
                double cos = getRadius(Math.cos(i));
                Location corner1 = getCentre().clone().add(sin, 0, cos);
                Location corner2 = getCentre().clone().subtract(sin, 0, cos);
                for (Location c : new Location[]{corner1, corner2})
                    c.getWorld().playEffect(c, Effect.NOTE, 0);
    But I'd like to add lines In Between (Yes, I linked to a Beartooth song called In Between xD) the different points.
    I'm very new to trigonomonomonomology. (Google meant it was 'trigonometry', for those who didn't understand)

    Anyone got an idea?
    Thanks! <3