本帖最后由 fyq6102427 于 2017-1-2 10:46 编辑
零.本功能的基础
0.说些重要的
本功能建立在WorldEdit插件的//generate指令上。
关于该指令的详细研究可以参照Az大大的帖子 http://www.mcbbs.net/thread-535283-1-1.html←点击
请确保:
*你阅读了上文的帖子
*明白该帖子的运作原理
*拥有至少高一(或理解力至少高一)的数学水平
*明白函数是什么
*具有基本的道德水准
*明白约定俗成的缩写
1.一些注释
下文若没有额外表示,则有:
x,y,z分别为三元
a,b,c,d,e,f,g,h,i······为常数
下文中按照约定俗成,字母与字母、字母与数字之间省略“*”号
(然而WE表达式仍然需要)
下文中的“f.e.”表示举例
从第二节开始,如果没有额外表示,则
“=”表示<,>,<=,>= (这是因为WE里使用不等式)
所有表示度数的皆默认选取区域为立方体
一.必须知道的
1.什么是三元函数?
2.函数与WorldEdit
二.几个基本二元函数的三元形式及其WE基础表达式
1.一次函数
2.二次函数
=w=今天先写到这里,哪天想起来说不定会填坑吧=w=
mark一下,1.2更新,新年新气象=w= 顺便说句,函数次数的增加与工作量成正指数增长啊...
0.说些重要的
本功能建立在WorldEdit插件的//generate指令上。
关于该指令的详细研究可以参照Az大大的帖子 http://www.mcbbs.net/thread-535283-1-1.html←点击
请确保:
*你阅读了上文的帖子
*明白该帖子的运作原理
*拥有至少高一(或理解力至少高一)的数学水平
*明白函数是什么
*具有基本的道德水准
*明白约定俗成的缩写
1.一些注释
下文若没有额外表示,则有:
x,y,z分别为三元
a,b,c,d,e,f,g,h,i······为常数
下文中按照约定俗成,字母与字母、字母与数字之间省略“*”号
(然而WE表达式仍然需要)
下文中的“f.e.”表示举例
从第二节开始,如果没有额外表示,则
“=”表示<,>,<=,>= (这是因为WE里使用不等式)
所有表示度数的皆默认选取区域为立方体
一.必须知道的
1.什么是三元函数?
[spoiler]三元函数属于本人下的一个词汇,并非本人发明,但有此类用法
其亦别称为三维函数、空间函数
*如果说二元函数理解为g(x,y),则三元函数为 f(x,y,z)=g(x,y)+g(x,z)+g(y,z)
*其可以由三个二元函数组合而成,三元函数在某个坐标面上呈现出二元函数的性质
*三元函数的复杂度数倍于二元函数,难理解度亦然
*三元函数有三个向量,它的三元(定义为x,y,z)互为自变量
三元函数可以理解为二元函数的升级版——
f.e.
二元一次函数的基本式:y=kx+h
三元一次函数的基本式:ay+b=cx+d=ez+f
二元函数的绝大部分定律在三元函数中仍然适用
[/spoiler]
2.函数与WorldEdit
[spoiler]WorldEdit在“某个版本”后新增了//generate指令,其作用是让使用者通过函数创造自定义图形。
这一方面的详细内容可见于 零部分 贴出的链接
其根本原理是利用WE在MC中绘制函数图像。
该功能支持全部的JAVA数学函数表达式(该表格内容摘录如下)
注:上表只翻译常用部分|
注2:上表中翻译了还看不懂的...请你认真看一下第零节...确定满足要求了再问问题吧...
同时,由于MC的机制,WE制造函数只能通过不等式,例如:
2*x<y+3<z
x^3>1
log(x+y)>0.5
该部分的详细机制同样参见Az大大的帖子
[/spoiler]
二.几个基本二元函数的三元形式及其WE基础表达式
1.一次函数
[spoiler]①基本式
二元函数:
y=k*x+h
f.e.
y=2x+7/2
三元函数:
z=ax+by+c
y=dx+ez+f
x=gy+hz+i
或
z=ax+b=cy+d
(该部分表达式本应为ax+b=cy+d=ez+f,但可以通过转化化简为上述形式,后同)
f.e.
z=6x+5/2=2/3y+9
②三元基本表达式(WE中)
三元一次函数在WE中的表达式如下:
ax+by+cz=d
f.e.
x+y+z<1
填充所有横坐标,纵坐标,高坐标相加小于1的方块
③三元一次函数的图像和性质
首先我们来看看这个基本式:
ax+by+cz=d
这个表达式中,x,y,z分别表示横纵高坐标,那么a,b,c,d分别代表什么?
a,b,c分别代表斜率
a,b,c分别表示的是x,y,z三个方向的斜率,当a,b,c皆为1时,该斜平面在三个平面坐标系上与水平面的夹角=45°
a增大时,该斜平面与x轴的夹角增大
b增大时,该斜平面与y轴的夹角增大
c增大时,该斜平面与z轴的夹角增大
f.e.
x+3y=1
制造一个超级缓的缓坡
d代表偏移率
d值代表偏移率,d值增大,则该斜平面同时朝向各个平面坐标系的正半轴偏移,减小反之。
由于斜率相同的水平面互相平行且无限大(只能制造它在选区内的部分),因此d值只有一个(同时向各个方向偏移)
f.e.
嗯....这个恐怕不需要例子了
当d=0时,函数为奇函数
④应用
这个东西...可以用来建山坡一类的地形,如果加上-h可以拿来铺墙,各种墙,斜的巴拉巴拉
[/spoiler]
2.二次函数
[spoiler]
①基本式
二元函数:
抛物线:
ax^2+bx+c=y
或
a(x+x?)(x+x?)=y
或
a(x-h)^2+k=y
圆/椭圆:
ax^2+by^2+cx+dy=e
或
a(x+p)^2+b(y+q)^2=r
三元函数:
单坐标向曲面(即只在一个方向上弯曲的曲面):
等同于二元函数的抛物线函数
抛物面:
ax^2+by^2+cx+dy+ez=r
a、b和r越大,抛物面的开口越小;e越大,抛物面的开口越大
其中a控制在x轴方向上的开口,b控制在y轴方向上的开口,e和r同时控制两个方向的开口
c、d和r产生偏移
c会使抛物面向开口的反方向及x轴的正方向同时偏移
d会使抛物面向开口的反方向及y轴的正方向同时偏移
r在改变开口的同时会将抛物面向开口的反方向偏移
换句话说:a和b等于是挤压/撑开抛物面的一个方向,e是将抛物面拉平,而r则是像用棍子把抛物面顶起来——上升的同时周边下垂
[/spoiler]
=w=今天先写到这里,哪天想起来说不定会填坑吧=w=
mark一下,1.2更新,新年新气象=w=顺便说句,函数次数的增加与工作量成正指数增长啊...
零.本功能的基础
0.说些重要的
本功能建立在WorldEdit插件的//generate指令上。
关于该指令的详细研究可以参照Az大大的帖子 http://www.mcbbs.net/thread-535283-1-1.html←点击
请确保:
*你阅读了上文的帖子
*明白该帖子的运作原理
*拥有至少高一(或理解力至少高一)的数学水平
*明白函数是什么
*具有基本的道德水准
*明白约定俗成的缩写
1.一些注释
下文若没有额外表示,则有:
x,y,z分别为三元
a,b,c,d,e,f,g,h,i······为常数
下文中按照约定俗成,字母与字母、字母与数字之间省略“*”号
(然而WE表达式仍然需要)
下文中的“f.e.”表示举例
从第二节开始,如果没有额外表示,则
“=”表示<,>,<=,>= (这是因为WE里使用不等式)
所有表示度数的皆默认选取区域为立方体
一.必须知道的
1.什么是三元函数?
2.函数与WorldEdit
二.几个基本二元函数的三元形式及其WE基础表达式
1.一次函数
2.二次函数
=w=今天先写到这里,哪天想起来说不定会填坑吧=w=
mark一下,1.2更新,新年新气象=w= 顺便说句,函数次数的增加与工作量成正指数增长啊...
2021.12 数据,可能有更多内容
零.本功能的基础0.说些重要的
本功能建立在WorldEdit插件的//generate指令上。
关于该指令的详细研究可以参照Az大大的帖子 http://www.mcbbs.net/thread-535283-1-1.html←点击
请确保:
*你阅读了上文的帖子
*明白该帖子的运作原理
*拥有至少高一(或理解力至少高一)的数学水平
*明白函数是什么
*具有基本的道德水准
*明白约定俗成的缩写
1.一些注释
下文若没有额外表示,则有:
x,y,z分别为三元
a,b,c,d,e,f,g,h,i······为常数
下文中按照约定俗成,字母与字母、字母与数字之间省略“*”号
(然而WE表达式仍然需要)
下文中的“f.e.”表示举例
从第二节开始,如果没有额外表示,则
“=”表示<,>,<=,>= (这是因为WE里使用不等式)
所有表示度数的皆默认选取区域为立方体
一.必须知道的
1.什么是三元函数?
[spoiler]三元函数属于本人下的一个词汇,并非本人发明,但有此类用法
其亦别称为三维函数、空间函数
*如果说二元函数理解为g(x,y),则三元函数为 f(x,y,z)=g(x,y)+g(x,z)+g(y,z)
*其可以由三个二元函数组合而成,三元函数在某个坐标面上呈现出二元函数的性质
*三元函数的复杂度数倍于二元函数,难理解度亦然
*三元函数有三个向量,它的三元(定义为x,y,z)互为自变量
三元函数可以理解为二元函数的升级版——
f.e.
二元一次函数的基本式:y=kx+h
三元一次函数的基本式:ay+b=cx+d=ez+f
二元函数的绝大部分定律在三元函数中仍然适用
[/spoiler]
2.函数与WorldEdit
[spoiler]WorldEdit在“某个版本”后新增了//generate指令,其作用是让使用者通过函数创造自定义图形。
这一方面的详细内容可见于 零部分 贴出的链接
其根本原理是利用WE在MC中绘制函数图像。
该功能支持全部的JAVA数学函数表达式(该表格内容摘录如下)
方法(静态)概要 |
static double |
abs(double a) 绝对值 |
static float |
abs(float a) 绝对值 |
static int |
abs(int a) 绝对值 |
static long |
abs(long a) 绝对值 |
static double |
acos(double a) 反三角函数/反cos函数 |
static double |
asin(double a) 反三角函数/反sin函数 |
static double |
atan(double a) 反三角函数/反tan函数 |
static double |
atan2(double y, double x) 从直角坐标到极坐标的角度 |
static double |
cbrt(double a) Returns the cube root of a double value. |
static double |
ceil(double a) Returns the smallest (closest to negative infinity) double value that is greater than or equal to the argument and is equal to a mathematical integer. |
static double |
copySign(double magnitude, double sign) Returns the first floating-point argument with the sign of the second floating-point argument. |
static float |
copySign(float magnitude, float sign) Returns the first floating-point argument with the sign of the second floating-point argument. |
static double |
cos(double a) cos三角函数 |
static double |
cosh(double x) Returns the hyperbolic cosine of a double value. |
static double |
exp(double a) e的a次幂 |
static double |
expm1(double x) e的x次幂 -1 |
static double |
floor(double a) Returns the largest (closest to positive infinity) double value that is less than or equal to the argument and is equal to a mathematical integer. |
static int |
getExponent(double d) Returns the unbiased exponent used in the representation of a double. |
static int |
getExponent(float f) Returns the unbiased exponent used in the representation of a float. |
static double |
hypot(double x, double y) Returns sqrt(x2 +y2) without intermediate overflow or underflow. |
static double |
IEEEremainder(double f1, double f2) Computes the remainder operation on two arguments as prescribed by the IEEE 754 standard. |
static double |
log(double a) 返回一个数的自然对数值(底数为e) |
static double |
log10(double a) 返回一个数以10为底数的对数值 |
static double |
log1p(double x) Returns the natural logarithm of the sum of the argument and 1. |
static double |
max(double a, double b) Returns the greater of two double values. |
static float |
max(float a, float b) Returns the greater of two float values. |
static int |
max(int a, int b) Returns the greater of two int values. |
static long |
max(long a, long b) Returns the greater of two long values. |
static double |
min(double a, double b) Returns the smaller of two double values. |
static float |
min(float a, float b) Returns the smaller of two float values. |
static int |
min(int a, int b) Returns the smaller of two int values. |
static long |
min(long a, long b) Returns the smaller of two long values. |
static double |
nextAfter(double start, double direction) Returns the floating-point number adjacent to the first argument in the direction of the second argument. |
static float |
nextAfter(float start, double direction) Returns the floating-point number adjacent to the first argument in the direction of the second argument. |
static double |
nextUp(double d) Returns the floating-point value adjacent to d in the direction of positive infinity. |
static float |
nextUp(float f) Returns the floating-point value adjacent to f in the direction of positive infinity. |
static double |
pow(double a, double b) Returns the value of the first argument raised to the power of the second argument. |
static double |
random() Returns a double value with a positive sign, greater than or equal to 0.0 and less than 1.0. |
static double |
rint(double a) Returns the double value that is closest in value to the argument and is equal to a mathematical integer. |
static long |
round(double a) Returns the closest long to the argument. |
static int |
round(float a) Returns the closest int to the argument. |
static double |
scalb(double d, int scaleFactor) Return d × 2scaleFactor rounded as if performed by a single correctly rounded floating-point multiply to a member of the double value set. |
static float |
scalb(float f, int scaleFactor) Return f × 2scaleFactor rounded as if performed by a single correctly rounded floating-point multiply to a member of the float value set. |
static double |
signum(double d) Returns the signum function of the argument; zero if the argument is zero, 1.0 if the argument is greater than zero, -1.0 if the argument is less than zero. |
static float |
signum(float f) Returns the signum function of the argument; zero if the argument is zero, 1.0f if the argument is greater than zero, -1.0f if the argument is less than zero. |
static double |
sin(double a) sin三角函数 |
static double |
sinh(double x) Returns the hyperbolic sine of a double value. |
static double |
sqrt(double a) 取其二次根 |
static double |
tan(double a) tan三角函数 |
static double |
tanh(double x) Returns the hyperbolic tangent of a double value. |
static double |
toDegrees(double angrad) Converts an angle measured in radians to an approximately equivalent angle measured in degrees. |
static double |
toRadians(double angdeg) Converts an angle measured in degrees to an approximately equivalent angle measured in radians. |
static double |
ulp(double d) Returns the size of an ulp of the argument. |
static float |
ulp(float f) Returns the size of an ulp of the argument. |
注:上表只翻译常用部分|
注2:上表中翻译了还看不懂的...请你认真看一下第零节...确定满足要求了再问问题吧...
同时,由于MC的机制,WE制造函数只能通过不等式,例如:
2*x<y+3<z
x^3>1
log(x+y)>0.5
该部分的详细机制同样参见Az大大的帖子
[/spoiler]
二.几个基本二元函数的三元形式及其WE基础表达式
1.一次函数
[spoiler]①基本式
二元函数:
y=k*x+h
f.e.
y=2x+7/2
三元函数:
z=ax+by+c
y=dx+ez+f
x=gy+hz+i
或
z=ax+b=cy+d
(该部分表达式本应为ax+b=cy+d=ez+f,但可以通过转化化简为上述形式,后同)
f.e.
z=6x+5/2=2/3y+9
②三元基本表达式(WE中)
三元一次函数在WE中的表达式如下:
ax+by+cz=d
f.e.
x+y+z<1
填充所有横坐标,纵坐标,高坐标相加小于1的方块
③三元一次函数的图像和性质
首先我们来看看这个基本式:
ax+by+cz=d
这个表达式中,x,y,z分别表示横纵高坐标,那么a,b,c,d分别代表什么?
a,b,c分别代表斜率
a,b,c分别表示的是x,y,z三个方向的斜率,当a,b,c皆为1时,该斜平面在三个平面坐标系上与水平面的夹角=45°
a增大时,该斜平面与x轴的夹角增大
b增大时,该斜平面与y轴的夹角增大
c增大时,该斜平面与z轴的夹角增大
f.e.
x+3y=1
制造一个超级缓的缓坡
d代表偏移率
d值代表偏移率,d值增大,则该斜平面同时朝向各个平面坐标系的正半轴偏移,减小反之。
由于斜率相同的水平面互相平行且无限大(只能制造它在选区内的部分),因此d值只有一个(同时向各个方向偏移)
f.e.
嗯....这个恐怕不需要例子了
当d=0时,函数为奇函数
④应用
这个东西...可以用来建山坡一类的地形,如果加上-h可以拿来铺墙,各种墙,斜的巴拉巴拉
[/spoiler]
2.二次函数
[spoiler]
①基本式
二元函数:
抛物线:
ax^2+bx+c=y
或
a(x+x?)(x+x?)=y
或
a(x-h)^2+k=y
圆/椭圆:
ax^2+by^2+cx+dy=e
或
a(x+p)^2+b(y+q)^2=r
三元函数:
单坐标向曲面(即只在一个方向上弯曲的曲面):
等同于二元函数的抛物线函数
抛物面:
ax^2+by^2+cx+dy+ez=r
a、b和r越大,抛物面的开口越小;e越大,抛物面的开口越大
其中a控制在x轴方向上的开口,b控制在y轴方向上的开口,e和r同时控制两个方向的开口
c、d和r产生偏移
c会使抛物面向开口的反方向及x轴的正方向同时偏移
d会使抛物面向开口的反方向及y轴的正方向同时偏移
r在改变开口的同时会将抛物面向开口的反方向偏移
换句话说:a和b等于是挤压/撑开抛物面的一个方向,e是将抛物面拉平,而r则是像用棍子把抛物面顶起来——上升的同时周边下垂
[/spoiler]
=w=今天先写到这里,哪天想起来说不定会填坑吧=w=
mark一下,1.2更新,新年新气象=w=顺便说句,函数次数的增加与工作量成正指数增长啊...