Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Line not displayed #30

Closed
mschauer opened this issue Dec 9, 2017 · 8 comments
Closed

Line not displayed #30

mschauer opened this issue Dec 9, 2017 · 8 comments

Comments

@mschauer
Copy link
Contributor

mschauer commented Dec 9, 2017

The line z is not displayed. Uncommenting the third point in z makes the line visible.

using Makie, Colors, GeometryTypes
scene = Scene(resolution = (200, 200))
x = [Point3f0(0,1,l) for l in [0., 1., 2., 3.]]
z = [Point3f0(0,0,l) for l in [-0.5, #=0.0,=# 0.5]]
lines(x, linewidth=3.5, color=colorant"black")
lines(z, linewidth=3.5, color=:darkred)

center!(scene)
@mschauer
Copy link
Contributor Author

Maybe related, I cannot plot lines with repeating points, e.g.

using Makie, Colors, GeometryTypes
scene = Scene(resolution = (200, 200))
z = [rand(SVector{3,Float64}) for i in 1:10]
lines(z, linewidth=0.5, color=:darkred)
lines([z[1],z[1],z[2],z[3],z[3],z[3],z[4],z[5],z[6],z[7], z[7],z[8],z[9],z[10]], linewidth=3.5, color=:darkred)
center!(scene)

@SimonDanisch
Copy link
Member

sorry, the first one is actually a known problem :( the second one is new :D let me check it out

@SimonDanisch
Copy link
Member

The first one is fixed by checking for lines with N < 4 and then padding it :P I had some code in Plots.jl which i just haven't ported to Makie yet.

@mschauer
Copy link
Contributor Author

Again thanks for your work. Given that Makie is not even released yet, I am getting good mileage out of it. Check out https://github.com/mschauer/Bridge.jl/blob/master/example/3DExamples.ipynb

@SimonDanisch
Copy link
Member

Nice notebook! I should make that part of the examples ;)

I think the line generation rendering shader is simply not robust to repeating points. I should just insert a unique into the pipeline. Although that will be quite expensive for animated lines without repeating points.

@mschauer
Copy link
Contributor Author

I solved it by adding visually invisible noise. That is a very "Erlang" thing to do.

@mschauer
Copy link
Contributor Author

should make that part of the examples ;)

Please do! In any case, Bridge and Makie have uncanny interoperability because of the joint FixedSizeArrays heritage. See for example https://gist.github.com/mschauer/351ef5af3458192172cfb785443b47e1 . Let's evolve that, endgame being particles moving in Makie following Ordinary or Stochastic Differential equations :-)

@ffreyer
Copy link
Collaborator

ffreyer commented May 31, 2021

Both of these look fine to me now

@ffreyer ffreyer closed this as completed May 31, 2021
SimonDanisch added a commit that referenced this issue Jun 3, 2021
Fix issues created by the refactoring of signed distance rendering
SimonDanisch added a commit that referenced this issue Jun 3, 2021
fix scene clipping and the vertical translation bug
SimonDanisch added a commit that referenced this issue Jun 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants