@@ -26,8 +26,8 @@ export MeanValue
26
26
# This example was taken from [this page of CGAL's documentation](https://doc.cgal.org/latest/Barycentric_coordinates_2/index.html).
27
27
#=
28
28
```@example barycentric
29
- import GeometryOps as GO
30
- using Makie, CairoMakie, GeoInterfaceMakie
29
+ import GeometryOps as GO, GeoInterface as GI
30
+ using CairoMakie, GeoInterfaceMakie # plotting
31
31
# Define a polygon
32
32
polygon_points = Point3f[
33
33
(0.03, 0.05, 0.00), (0.07, 0.04, 0.02), (0.10, 0.04, 0.04),
@@ -84,10 +84,10 @@ cb = Colorbar(f[2, :], p1.plots[1]; vertical = false, flipaxis = true)
84
84
xrange = LinRange(ext.X..., 400)
85
85
yrange = LinRange(ext.Y..., 400)
86
86
@time mean_values = GO.barycentric_interpolate.(
87
- (MeanValue(),), # The barycentric coordinate algorithm (MeanValue is the only one for now)
88
- (Point2f. (polygon_points),), # The polygon points as `Point2f`
87
+ (GO. MeanValue(),), # The barycentric coordinate algorithm (MeanValue is the only one for now)
88
+ ((polygon_points),), # The polygon points as `Point2f`
89
89
(last.(polygon_points,),), # The values per polygon point - can be anything which supports addition and division
90
- Point2f .(xrange, yrange') # The points at which to interpolate
90
+ tuple .(xrange, yrange') # The points at which to interpolate
91
91
)
92
92
# and render!
93
93
hm = heatmap!(a2, xrange, yrange, mean_values; colormap = p1.colormap, colorrange = p1.plots[1].colorrange[], xautolimits = false, yautolimits = false)
0 commit comments