1. Welcome to the Brawl website! Feel free to look around our forums. Join our growing community by typing /register in-game!

WorldEdit Sphere Generation Equation

Discussion in 'Guides' started by Xelasi, Jun 3, 2017.

Thread Status:
Please be aware that this thread is more than 30 days old. Do not post unless the topic can still be discussed. Read more...
  1. Xelasi

    Xelasi Well-Known Member

    Joined:
    May 17, 2015
    Messages:
    1,026
    Ratings:
    +944
    FAWE can now handle larger edits without crashing the server, so I'm making this information available.
    Note: Try out Selection Commands (//sel) First
    It's probably simpler to use the //sel commands to create rounded shapes.
    Generation is an alternate option available if needed.

    //sel sphere
    Left click to select center, right click to extend.

    //sel ellipsoid
    Left-click to choose center, right-click to extend.
    You can either right-click horizontally to select a horizontal ellipse, or right-click vertically to select a vertical ellipse. But if you want to select a ellipsoid area you need to right-click at least twice.




    WorldEdit Generation Command: //g
    Arbitrary shapes can be created on Build by selecting an area and using a math equation.
    More information on the //g command and generation can be found here on the WorldEdit Wiki.

    A great tool you can use for getting equations: K3DSurf : 3D Surface Generator

    [​IMG]
    I used this and tweaked the formulas just a bit to make them work. I'm personally not great at math, so I'm sure someone better at math could make some cool things.



    Getting Started
    • Use //pos1 and //pos2 to select an area.
      [​IMG]
    • Use the format: //g blockid equation

    Generation side notes:

    • -h makes the shape hollow, removing -h makes it solid.
    • Inverting the function (multiply by negative 1) will usually swap the air and stone filled areas.


    Solid Sphere / Spheroid / Ellipsoid of Any Size
    //g stone -x*x -y*y -z*z +1

    [​IMG]

    If you select uneven corners:
    [​IMG]

    If you make it only one block tall, you can generate a 1-block high cylinder.
    [​IMG]
    Hollow Sphere / Spheroid / Ellipsoid of Any Size
    //g -h stone -x*x -y*y -z*z +1

    Produces same spheroid shapes as above with a hollow center.
    [​IMG]
    Hollow Eight-Sided Diamond
    //g -h stone abs(x)+abs(y)+abs(z) - 1

    [​IMG]

    [​IMG]
    Tunneling Hyperboloid
    //g -h stone -x^2 - y^2 + z^2 +0.3

    [​IMG]
    [​IMG]
    "Pringle" Shape
    //g -h stone -x*x - y + z*z

    [​IMG]
    "Circle Around Cube" Shape
    //g -h stone ((x^2 + y^2 - 1)^2 + z^2)* ((y^2 + z^2 - 1)^2 + x^2)* ((z^2 + x^2 - 1)^2 + y^2) - 0.075

    [​IMG]
    "Box with Holes" Shape
    //g -h stone (x^4) - y^4 -z^4 - (-x^2 - y^2 -z^2)

    [​IMG]

    Enjoy!
     
    • Like Like x 7
    • Useful Useful x 2
    • Creative Creative x 1
    #1 Xelasi, Jun 3, 2017
    Last edited: Jun 3, 2017
  2. featherpaw

    featherpaw Your friendly neighborhood kitten! :3

    Joined:
    Aug 16, 2015
    Messages:
    2,548
    Ratings:
    +1,424
    Really cool idea and it could definitely help me with my building! Thanks!
     
    • Friendly Friendly x 1
  3. GalaThundR

    GalaThundR Mcpvp Veteran

    Joined:
    Jul 18, 2015
    Messages:
    902
    Ratings:
    +721
    Discord:
    GalaThundR#7914
    Cool guide, albeit I don't see many people using this because maths but nevertheless cool that you understand all this.
     
    • Agree Agree x 3
  4. Xelasi

    Xelasi Well-Known Member

    Joined:
    May 17, 2015
    Messages:
    1,026
    Ratings:
    +944
    I was kind of devastated at not having access to my own post in the Builder section when I needed the equations later. I wasn't about to go make them again... because maths.

    lol.

    At least these are copypaste now.
     
  5. NickManEA

    NickManEA Build JMOD

    Joined:
    Aug 8, 2015
    Messages:
    1,498
    Ratings:
    +717
    Discord:
    NickManEA#1421
    As he said
     
    • Agree Agree x 1
  6. Lekosa1

    Lekosa1 mineman

    Joined:
    Sep 26, 2014
    Messages:
    3,323
    Ratings:
    +1,677
    One thing to remember when using /g is to make sure the selected area can actually fit the structure.

    Really nice guide Xelasi. Problem is I'm sure only 99% of forumers are able to figure out the maths. :stuck_out_tongue:
     
    • Agree Agree x 1
  7. loicvdb

    loicvdb Well-Known Member

    Joined:
    Mar 11, 2016
    Messages:
    94
    Ratings:
    +94
    Can you put imaginary number in the parametric function?
    It could be cool to make a mandelbrot set, julia set or newtonian fractal with it. Awesome guide!

    Edit: just checked up, these functions uses the java math library so no imaginary numbers :frowning:
     
    • Creative Creative x 1
    #7 loicvdb, Jun 3, 2017
    Last edited: Jun 3, 2017
Loading...
Similar Threads Forum Date
Bad WorldEdit command MinecraftBuild Jul 5, 2020
Worldedit issue MinecraftBuild Mar 31, 2018
Help Map loss and Worldedit Bug ?? MinecraftBuild Dec 27, 2017
What is the biggest/weirdest WorldEdit creation you have ever made? MinecraftBuild Sep 18, 2016
Not allowed to use certain blocks (WorldEdit) MinecraftBuild Jul 9, 2016
Thread Status:
Please be aware that this thread is more than 30 days old. Do not post unless the topic can still be discussed. Read more...