diff --git a/RPRMakie/examples/makie_example.jl b/RPRMakie/examples/makie_example.jl index c2dbd65f47a..32a099ba9cd 100644 --- a/RPRMakie/examples/makie_example.jl +++ b/RPRMakie/examples/makie_example.jl @@ -3,7 +3,7 @@ using FileIO, Colors using RPRMakie RPRMakie.activate!(iterations=200) earth = load(Makie.assetpath("earth.png")) -m = uv_mesh(Tesselation(Sphere(Point3f(0), 1.0f0), 60)) +m = uv_mesh(Tessellation(Sphere(Point3f(0), 1.0f0), 60)) f, ax, mplot = Makie.mesh(m; color=earth) Makie.mesh!(ax, Sphere(Point3f(2, 0, 0), 0.1f0); color=:red) x, y = collect(-8:0.5:8), collect(-8:0.5:8) diff --git a/RPRMakie/src/meshes.jl b/RPRMakie/src/meshes.jl index 873eac16e0e..a900534f8f0 100644 --- a/RPRMakie/src/meshes.jl +++ b/RPRMakie/src/meshes.jl @@ -165,7 +165,7 @@ function to_rpr_object(context, matsys, scene, plot::Makie.Surface) end positions = lift(grid, x, y, z, Makie.transform_func_obs(plot)) - r = Tesselation(Rect2f((0, 0), (1, 1)), size(z[])) + r = Tessellation(Rect2f((0, 0), (1, 1)), size(z[])) # decomposing a rectangle into uv and triangles is what we need to map the z coordinates on # since the xyz data assumes the coordinates to have the same neighouring relations # like a grid diff --git a/ReferenceTests/src/tests/examples3d.jl b/ReferenceTests/src/tests/examples3d.jl index 9fd324476f4..7140253857e 100644 --- a/ReferenceTests/src/tests/examples3d.jl +++ b/ReferenceTests/src/tests/examples3d.jl @@ -9,7 +9,7 @@ cameracontrols(ax).settings.center[] = false # avoid recenter on display earth = loadasset("earth.png") - m = uv_mesh(Tesselation(Sphere(Point3f(0), 1f0), 60)) + m = uv_mesh(Tessellation(Sphere(Point3f(0), 1f0), 60)) mesh(f[1, 2], m, color=earth, shading=NoShading) catmesh = loadasset("cat.obj") @@ -315,7 +315,7 @@ end N = 3; nbfacese = 30; radius = 0.02 large_sphere = Sphere(Point3f(0), 1f0) - positions = decompose(Point3f, Tesselation(large_sphere, 30)) + positions = decompose(Point3f, Tessellation(large_sphere, 30)) np = length(positions) pts = [positions[k][l] for k = 1:length(positions), l = 1:3] pts = vcat(pts, 1.1 .* pts + RNG.randn(size(pts)) / perturbfactor) # light position influence ? @@ -323,8 +323,8 @@ end ne = size(edges, 1); np = size(pts, 1) cylinder = Cylinder(Point3f(0), Point3f(0, 0, 1.0), 1f0) # define markers meshes - meshC = normal_mesh(Tesselation(cylinder, nbfacese)) - meshS = normal_mesh(Tesselation(large_sphere, 20)) + meshC = normal_mesh(Tessellation(cylinder, nbfacese)) + meshS = normal_mesh(Tessellation(large_sphere, 20)) # define colors, markersizes and rotations pG = [Point3f(pts[k, 1], pts[k, 2], pts[k, 3]) for k = 1:np] lengthsC = sqrt.(sum((pts[edges[:,1], :] .- pts[edges[:, 2], :]).^2, dims=2)) diff --git a/WGLMakie/src/imagelike.jl b/WGLMakie/src/imagelike.jl index 3bd9c72c2a5..b5a9cb8bce8 100644 --- a/WGLMakie/src/imagelike.jl +++ b/WGLMakie/src/imagelike.jl @@ -16,7 +16,7 @@ function create_shader(mscene::Scene, plot::Surface) apply_transform_and_f32_conversion(plot, f32c, grid_ps) end positions = Buffer(ps) - rect = lift(z -> Tesselation(Rect2(0f0, 0f0, 1f0, 1f0), size(z)), plot, pz) + rect = lift(z -> Tessellation(Rect2(0f0, 0f0, 1f0, 1f0), size(z)), plot, pz) fs = lift(r -> decompose(QuadFace{Int}, r), plot, rect) fs = map((ps, fs) -> filter(f -> !any(i -> (i > length(ps)) || isnan(ps[i]), f), fs), plot, ps, fs) faces = Buffer(fs) diff --git a/docs/src/reference/plots/mesh.md b/docs/src/reference/plots/mesh.md index f71c6fe4fab..541f59582b5 100644 --- a/docs/src/reference/plots/mesh.md +++ b/docs/src/reference/plots/mesh.md @@ -43,7 +43,7 @@ mesh( using GeometryBasics # Reduce quality of sphere -s = Tesselation(Sphere(Point3f(0), 1f0), 12) +s = Tessellation(Sphere(Point3f(0), 1f0), 12) ps = coordinates(s) fs = faces(s) @@ -83,7 +83,7 @@ points = vec([Point3f(xv, yv, zv) for (xv, yv, zv) in zip(x2, y2, z2)]) # The coordinates form a matrix, so to connect neighboring vertices with a face # we can just use the faces of a rectangle with the same dimension as the matrix: -_faces = decompose(QuadFace{GLIndex}, Tesselation(Rect(0, 0, 1, 1), size(z2))) +_faces = decompose(QuadFace{GLIndex}, Tessellation(Rect(0, 0, 1, 1), size(z2))) # Normals of a centered sphere are easy, they're just the vertices normalized. _normals = normalize.(points) diff --git a/src/basic_recipes/wireframe.jl b/src/basic_recipes/wireframe.jl index d22fa051121..73c7114d2e2 100644 --- a/src/basic_recipes/wireframe.jl +++ b/src/basic_recipes/wireframe.jl @@ -15,7 +15,7 @@ function plot!(plot::Wireframe{<: Tuple{<: Any, <: Any, <: AbstractMatrix}}) points = vec(Point3f.(xvector(x, M), yvector(y, N), z)) # Connect the vetices with faces, as one would use for a 2D Rectangle # grid with M,N grid points - faces = decompose(LineFace{GLIndex}, Tesselation(Rect2(0, 0, 1, 1), (M, N))) + faces = decompose(LineFace{GLIndex}, Tessellation(Rect2(0, 0, 1, 1), (M, N))) connect(points, faces) end linesegments!(plot, Attributes(plot), points_faces) diff --git a/src/utilities/utilities.jl b/src/utilities/utilities.jl index e9effd5b154..f79c9d8369f 100644 --- a/src/utilities/utilities.jl +++ b/src/utilities/utilities.jl @@ -426,7 +426,7 @@ function surface2mesh(xs, ys, zs::AbstractMatrix, transform_func = identity, spa ps = matrix_grid(p -> apply_transform(transform_func, p, space), xs, ys, zs) # create valid tessellations (triangulations) for the mesh # knowing that it is a regular grid makes this simple - rect = Tesselation(Rect2f(0, 0, 1, 1), size(zs)) + rect = Tessellation(Rect2f(0, 0, 1, 1), size(zs)) # we use quad faces so that color handling is consistent faces = decompose(QuadFace{Int}, rect) # and remove quads that contain a NaN coordinate to avoid drawing triangles