electripy icon indicating copy to clipboard operation
electripy copied to clipboard

An alternative approach to `RedBlueColorGenerator`

Open astro-ray opened this issue 2 years ago • 2 comments

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}}$$

astro-ray avatar Dec 04 '22 04:12 astro-ray

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 avatar Dec 07 '22 15:12 dylannalex

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.

astro-ray avatar Dec 08 '22 05:12 astro-ray