Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Description
- This command generates a pie inside your selection, and you can customize the pie's shape with six variables (b, d, n, f, t, h). The command makes the crust a different color from the filling by changing the block's data value. I recommend keeping the block inside the command as stained glass (95) and recoloring everything to your liking after the pie has been generated.
- # The command
- //g 95 b=0.85;d=45;n=4;f=0.1;t=0.1;h=0.9;r=sqrt(x^2+z^2);w=b+(1-b)*(y+1)/2-f*(y+1)^4/16*(1-cos(360/d*n*atan2(z,x)))/2;data=(w-r<=t||(y+1)/2<=t)?1:0;r<=w&&abs(atan2(z,x))<=d*pi/360&&((w-r<=t)?1:((y+1)/2<=h))
- # The variables
- - 'b' controls how wide the base of the pie is in proportion to the full width of your selection. If b = 0.5, then the base of that pie will be half that of the width at the top of the pie. The edge of the pie is sort of like a line drawn from the base width to the top width. I'm doing a terrible job of describing what this variable does in words, so just mess around with it if you want. 'b' should range from 0 to 1, but I recommend something 0.8 to 0.9 for an accurate pie crust look.
- - 'd' controls the angle in degrees that the pie covers—this should hopefully need no more explaining. For reference, most pies seem to be sliced in eighths, and 1/8 of 360 degrees is 45 degrees. So for an accurate single slice of pie, d = 45.
- - 'n' is the number of indentations around the edge of the pie crust **no matter what angle your pie covers**. This number should be a whole number, especially if your pie is a complete pie (d = 360).
- - 'f' controls the factor for how bumpy the indentations are. Smaller values mean less bumpy, larger values mean more bumpy. This number can be between 0 and 1, but I recommend leaving it close to 0.1.
- - 't' controls the thickness of the crust. Once again, this value can range from 0 to 1, and I recommend leaving it near 0.1.
- - 'h' controls the height of the pie filling. If you want your pie to be entirely filled to the top, then set h = 1. If you want your pie to be half-full, then set h = 0.5. I hope these examples are intuitive enough.
Advertisement
Add Comment
Please, Sign In to add comment