In [15]:
mgrid(0f0:dphi:(pi+dphi*1.5f0), 0f0:dtheta:(2f0*pi+dtheta*1.5f0));
In [25]:
using MultivariateOrthogonalPolynomials
S = MultivariateOrthogonalPolynomials.ProductTriangle(1,1,1)
Out[25]:
In [22]:
function mgrid(dim1, dim2)
X = [i for i in dim1, j in dim2]
Y = [j for i in dim1, j in dim2]
return X,Y
end
X, Y = mgrid(linspace(-1f0,1f0,100),linspace(-1f0,1f0,100))
Z = exp.(-X.^2-Y.^2)
window = glscreen()
_view(visualize((X,Y,Z), :surface))
@async renderloop(window)
Out[22]:
In [11]:
using GLVisualize, GLAbstraction, Colors, Reactive, GeometryTypes, ApproxFun
f = Fun((x,y)->exp(-x^2-y^2)*cos(y))
pts = points(f)
x = Float32.(first.(pts))
y = Float32.(last.(pts))
z = Float32.(values(f))
window = glscreen()
_view(visualize((x,y,z), :surface))
@async renderloop(window)
In [6]:
using GLVisualize, GLAbstraction, Colors, Reactive, GeometryTypes
window = glscreen()
timesignal = loop(linspace(0f0,1f0,360))
# generate some pretty data
function xy_data(x,y,i, N)
x = ((x/N)-0.5f0)*i
y = ((y/N)-0.5f0)*i
r = sqrt(x*x + y*y)
Float32(sin(r)/r)
end
surf(i, N) = Float32[xy_data(x, y, i, N) for x=1:N, y=1:N]
t = map(t->(t*30f0)+20f0, timesignal)
bb = Signal(AABB{Float32}(Vec3f0(0), Vec3f0(1)))
_view(visualize((Float32.(1:400),Float32.(1:400),surf(1,400)), :surface, boundingbox=bb))
@async renderloop(window)
In [4]:
Float32.(1:400)
Out[4]:
In [2]:
using GLVisualize, GLAbstraction, Colors, Reactive, GeometryTypes
window = glscreen()
timesignal = loop(linspace(0f0,1f0,360))
# generate some pretty data
function xy_data(x,y,i, N)
x = ((x/N)-0.5f0)*i
y = ((y/N)-0.5f0)*i
r = sqrt(x*x + y*y)
Float32(sin(r)/r)
end
surf(i, N) = Float32[xy_data(x, y, i, N) for x=1:N, y=1:N]
t = map(t->(t*30f0)+20f0, timesignal)
bb = Signal(AABB{Float32}(Vec3f0(0), Vec3f0(1)))
_view(visualize(const_lift(surf, t, 400), :surface, boundingbox=bb))
renderloop(window)
In [1]:
using ApproxFun, MultivariateOrthogonalPolynomials, Reactive, GLAbstraction, GLVisualize
In [3]:
function xy_data(x,y,i, N)
x = ((x/N)-0.5f0)*i
y = ((y/N)-0.5f0)*i
r = sqrt(x*x + y*y)
Float32(sin(r)/r)
end
surf(i, N) = Float32[xy_data(x, y, i, N) for x=1:N, y=1:N]
window = glscreen()
view(visualize(surf(1,10),:surface))
@async renderloop(window)
In [12]:
timesignal = loop(linspace(0f0,1f0,360))
t = map(t->(t*30f0)+20f0, timesignal)
In [5]:
f = Fun((x,y)->exp(-x^2-y^2)*cos(y))
Out[5]:
In [ ]:
In [47]:
S = TriangleWeight(1,1,1,JacobiTriangle(1,1,1))
Δ = Laplacian(S)
Dx = Derivative(S,[1,0])
Dy = Derivative(S,[0,1])
h=0.001
ε=0.01
A=I-h*(ε*Δ+Dx)
QR=qrfact(A)
u0=10Fun(S,randn(10));
In [48]:
u = Signal(u0);
map(u->surface(u),u)
Out[48]:
In [38]:
push!(u,10u0)
In [51]:
plotly()
Out[51]:
In [ ]: