> |
with(plots): with(plottools): |
> |
lerp :=
proc(p,q,r,s,t) |
> |
badecas:=proc(L,r,s)
local i, b; |
> |
decas:=proc(L,r,s)
local i,j, b, cc,c; |
> |
beziercurve:=proc(L,
u) local n, b, k; |
> |
bezierplot:=proc(L,
r, s) local bb; |
> |
cpoly:=[[-1, 1], [0,
-1], [1, 1]]; |
|
> |
bezierplot(cpoly, -1,2); |
> |
cpoly:=[[-1, 0], [0,
2], [1, 0]]; |
|
> |
beziercurve(cpoly, t); |
|
問題1の答
> |
factor(%); |
|
> |
cpoly:=[[0, -1], [2,
0], [0, 1]]; |
|
> |
cpoly:=[[-1, 1], [0,
-1], [1, 1]]; |
|
> |
cpoly:=[[1, 0], [1,
1], [0, 1]]; |
|
> |
cpoly:=[[3,2], [-1,
-3], [-1, 3], [3,-2]]; |
|
|
|
> |
cpoly:=[[-1,-1],[-3/5,1],[-1/5,-1],[1/5,1],
[3/5,-1], [1,1]]; |
|
|
> |
factor(%); |
|
問題2の答
> |
cpoly:=[[2652/15625,
200512416/244140625], |
|
> |
AA:=plot(cpoly,
color=black, thickness=2): |
|
> |
elevt:=proc(L, rr)
local j, i, b, bb ; |
|
> |
cpoly:=[[-1, 1], [0, -1], [1, 1]]; |
|
> |
plot(cpoly, color=blue, thickness=2); |
|
> |
elevt(cpoly, 4); |
|
問題3の答
> |
plot(elevt(cpoly, 4), color=red, thickness=2); |
|
> |
cpoly:=[[3,2], [-1, -2], [-1, 2], [3,-2]]; |
|
> |
a1:=plot(elevt(cpoly,
2), color=red, thickness=2): |
|
> |
lsubdivstep:=proc(L,r,s)
local lpoly ; |
|
> |
rsubdivstep:=proc(L,r,s)
local rpoly; |
|
> |
subdivstep2:=proc(L,
n) local i,j, b, c,d, dpoly; |
> |
cpoly:=[[-1, 1], [0,
-1], [1, 1]]; |
|
|
> |
AA:=plot(cpoly,
color=black, thickness=2); |
問題4の答
|