-
-
Notifications
You must be signed in to change notification settings - Fork 315
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* copy ShadeYourData.jl and make a recipe * use points and threads * improve performance + add examples * avoid aggregation matrix reallocation on every update * use on_latest * fix points * remove unused destructured args * rearrange thread array and avoid clamp * remove `@time` * clean up and documentation * categorical prototype * improve wording * clean up + legend for categorical * dont use async for output * update link to script * start adding docstrings * improve docs and names * fix imports * fix docs * address code review by @jkrumbiegel * make videos autoplay * fix missing var * fix import * update docs + support Colorbar * add test * clean up * remove unused + better stacktrace * implement texture resizing for WGLMakie * forgot new * don't make legend elements half transparent * Hack into JS to get some logs in Julia * stringify doesnt work on any object * try catch!? * did this time out simply because its slow?! * bring beck fewer airports * fix test * add comment --------- Co-authored-by: SimonDanisch <[email protected]>
- Loading branch information
1 parent
a957170
commit dd418b1
Showing
26 changed files
with
994 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
using DelimitedFiles, GLMakie | ||
GLMakie.activate!() # hide | ||
# For saving/showing/inlining into documentation we need to disable async calculation. | ||
Makie.set_theme!(DataShader=(; async_latest=false)) | ||
airports = Point2f.(eachrow(readdlm(assetpath("airportlocations.csv")))) | ||
(xmin, ymin), (xmax, ymax) = extrema(xx) | ||
|
||
xx = Rect2f(points) | ||
all(x-> x in xx, points) | ||
|
||
|
||
canvas = Canvas(Rect2f(points)) | ||
aggregate!(canvas, points); | ||
|
||
m = collect(Makie.get_aggregation(canvas)) | ||
|
||
(xmin, ymin), (xmax, ymax) = map(x-> x./widths(canvas.bounds), extrema(canvas.bounds)) | ||
|
||
xw, yw = 1 ./ size(m) | ||
maxi = maximum(mscaled) | ||
GLMakie.activate!() | ||
radiance = 50 | ||
lights = [EnvironmentLight(0.5, load(RPR.assetpath("studio026.exr"))), | ||
PointLight(Vec3f(0, 0, 2), RGBf(radiance, radiance, radiance))] | ||
mscaled = m ./ widths(canvas.bounds)[1] | ||
recmesh = GeometryBasics.normal_mesh(Rect3f(Vec3f(-0.5), Vec3f(1))) | ||
RPRMakie.activate!(plugin=RPR.Northstar, iterations=1, resource=RPR.RPR_CREATION_FLAGS_ENABLE_GPU1) | ||
f, ax, pl = meshscatter( | ||
xmin .. xmax, ymin .. ymax, mscaled; | ||
axis=(; type=LScene, show_axis=false, scenekw=(; lights=lights)), | ||
marker=recmesh, | ||
color=mscaled, | ||
colorrange=Vec2f(0.000001, maxi), | ||
lowclip=(:blue, 0.1), | ||
colormap=[:white, :red], | ||
material=(; type=:Microfacet, color=:gray, roughness=0.2, ior=1.390), | ||
markersize=Vec3f.(xw, yw, vec(mscaled)) | ||
) | ||
ax.scene |> display | ||
display(f; backend=GLMakie) | ||
using RPRMakie, FileIO | ||
|
||
RPRMakie.activate!(plugin=RPR.Tahoe, iterations=1, resource=RPR.RPR_CREATION_FLAGS_ENABLE_GPU1) | ||
RPRMakie.replace_scene_rpr!(ax.scene) | ||
|
||
|
||
l = lights[2] | ||
|
||
l.position[] = Vec3f(xmin + xmax/2, ymin + ymax / 2, widths(canvas.bounds)[1]) | ||
l.radiance[] = RGBf(500, 500, 500) | ||
|
||
pl.colorrange[] = Vec2f(0.000001, maxi) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.