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

transparency and rgl parameters in 3D plots (plotEqn3d) #37

Open
friendly opened this issue Oct 27, 2020 · 2 comments
Open

transparency and rgl parameters in 3D plots (plotEqn3d) #37

friendly opened this issue Oct 27, 2020 · 2 comments

Comments

@friendly
Copy link
Owner

In conjunction with a problem with ugly rendering of 2D ellipses in 3D heplots, Duncan Murdock suggested a solution using a new (to me) rgl property: mask_depth

https://stackoverflow.com/questions/64486375/rgl-how-to-avoid-moire-effect-in-transparent-3d-ellipsoids/64490059

In plotEqn3d, we use alpha=1 by default, so this problem doesn't arise, yet the result of showing regression planes is not very insightful. One can only see the non-occluded portions of the planes.

I've implemented Duncan's suggestion in plotEqn3d() on github, and tested it under different values of alpha. My question is: Should I change the default from alpha=1 to something alpha<1 ? Your thoughts?
[This also affects regec3d where the default results are often uglier]

Extending the example:

> # three consistent equations in three unknowns
> A <- matrix(c(13, -4, 2, -4, 11, -2, 2, -2, 8), 3,3)
> b <- c(1,2,4)
> plotEqn3d(A,b)
> plotEqn(A, b, alpha=0.5)
> plotEqn(A, b, alpha=0.8)

The differences among these are best seen in plots you can rotate.
In static views, I get:

alpha=1
plotEqn3d-opaque
alpha=0.5
plotEqn3d-trans-5
alpha=0.8
plotEqn3d-trans-8

@friendly
Copy link
Owner Author

I made the default alpha=0.9. Let me know what you think.

@gmonette
Copy link

I like alpha=0.9, especially for ellipsoids. It makes them look like big translucent balloons which, I imagine, enhances the sense of verisimilitude and makes the viewer's 3d cognitive apparatus more likely to get fully activated. Of course, I have no idea what I'm talking about ... but you might!

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

2 participants