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

Generalise dispace()/trispace()/tcspace() to higher dimensions #179

Open
Bisaloo opened this issue Nov 20, 2019 · 7 comments · May be fixed by #181
Open

Generalise dispace()/trispace()/tcspace() to higher dimensions #179

Bisaloo opened this issue Nov 20, 2019 · 7 comments · May be fixed by #181

Comments

@Bisaloo
Copy link
Collaborator

Bisaloo commented Nov 20, 2019

Already discussed on slack a year ago but posting here for easier reference.

https://doi.org/10.1007/s10905-011-9296-2

https://en.wikipedia.org/wiki/Simplex#Cartesian_coordinates_for_regular_n-dimensional_simplex_in_Rn

@Bisaloo Bisaloo mentioned this issue Nov 20, 2019
@Bisaloo
Copy link
Collaborator Author

Bisaloo commented Nov 20, 2019

This would probably require a breaking change because tcspace() currently uses Stoddard and Prum's convention for vertices.

@Bisaloo
Copy link
Collaborator Author

Bisaloo commented Nov 20, 2019

If we're in the mood of making breaking changes, we might as well go all the way through and use this black magic snippet from stack overflow:

simplex <- function(n) {
    qr.Q(qr(matrix(1,nrow=n)),complete=T)[,-1]
}

@thomased
Copy link
Collaborator

Woah, that's clever.

I'm open to a breaking change there if it means getting the gamut/monochromatic loci working. Using S&P has bugged me for a while anyway since it's out of line with the rest, but haven't had a good reason to swap. It's not a 'big' breaking change I guess since it's just a transform, so I'm probably on board if it means cool new functionality.

@Bisaloo Bisaloo linked a pull request Nov 20, 2019 that will close this issue
2 tasks
@Bisaloo
Copy link
Collaborator Author

Bisaloo commented Nov 20, 2019

http://www.avidsynergy.com/pdf/n_dimensional_spherical_cordinates.pdf

This might be the last missing piece.

@Bisaloo
Copy link
Collaborator Author

Bisaloo commented Nov 23, 2019

This would probably require a breaking change because tcspace() currently uses Stoddard and Prum's convention for vertices.

BTW, on that note, the vignette describes Kelber's convention, even for tetrachromats, when it's not the formula pavo currently uses.

@thomased
Copy link
Collaborator

Yeah, whoops. Let's consider the change for 2.4.

@Bisaloo
Copy link
Collaborator Author

Bisaloo commented Feb 10, 2020

For safekeeping:

https://blog.r-hub.io/2020/02/10/code-generation/

This might be another option instead of a single function for all dimensions.

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

Successfully merging a pull request may close this issue.

2 participants