a bit of VEX
Posted tadguo
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了a bit of VEX相关的知识,希望对你有一定的参考价值。
//Create a line with points
int pt_max = chi("Point_Max"); float length = chf("Length"); vector dir = chv("Direction"); dir = normalize(dir); vector offset = chv("Offset"); float stepVal = length / (float)(pt_max-1); int pts_all[]; resize(pts_all, pt_max); for(int i = 0; i < pt_max; i++) { vector pos = dir * (stepVal * i) + offset; int curId = addpoint(0, pos); pts_all[i] = curId; } //addprim(0, "polyline",pts_all); for(int i = 0; i < pt_max-1; i++) { addprim(0, "polyline", pts_all[i], pts_all[i+1]); }
//make it circle!
float gradiant = (float)@ptnum/(float)(@numpt - 1); @P.y = sin(gradiant * 2 * $PI); @P.z = cos(gradiant * 2 * $PI);
以上是关于a bit of VEX的主要内容,如果未能解决你的问题,请参考以下文章
报错“Field pet in XXX.HelloController required a bean of type ‘XXX.Pet‘ that could not be found.“(代码片段
leetcode_1292. Maximum Side Length of a Square with Sum Less than or Equal to Threshold_[二维前缀和](代码片段
Error in value[[3L]](cond) : You have a 32-bit version of Java. H2O works best with 64-bit Java.(代码片
TP5报如下的错误 Indirect modification of overloaded element of thinkpaginatorCollection has no effect(代码片段