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

An alternative approach to RedBlueColorGenerator #5

Open
astro-ray opened this issue Dec 4, 2022 · 2 comments
Open

An alternative approach to RedBlueColorGenerator #5

astro-ray opened this issue Dec 4, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@astro-ray
Copy link
Contributor

In RedBlueColorGenerator, instead of mapping the norm of the vector to a colour, you can map the potential at the point to a colour.
Potential as in: $$\phi(r) =- \vec{\text{E}}\cdot\vec{\text{r}}$$

@dylannalex
Copy link
Owner

Hey @ritamsaha00, thank you very much for your suggestion, it seems quite interesting! Can you explain me why is this approach better than mapping the norm of the vector to a color?.

@dylannalex dylannalex added the enhancement New feature or request label Dec 7, 2022
@astro-ray
Copy link
Contributor Author

astro-ray commented Dec 8, 2022

Before anything I should make this clear that, it’s not a better approach, this is just another way to visualize stuff.

Explaination: We will first take an $\vec{\textbf{E}}$ and take it's scalar product with the position vector of your field vector's starting point and map the colour value with the said scalar product

Advantages: With this you can somewhat visualize the equipotential surface and see how the direction of field vectors are wrt the equipotential surface. According to the relation of field and potential $$\vec{\textbf{E}}=\vec{\nabla}\phi$$
the field vectors should be normal to the equipotential surfaces.

Disadvantage: You will not be able visualize the magnitude of the field vectors

Note: I might've made some mistakes with sign, so please check that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants