# How could you graph a polar equation on a material?

**URL:** <https://forums.unrealengine.com/t/how-could-you-graph-a-polar-equation-on-a-material/488270>\
**Category:** Rendering\
**Tags:** math-expression, unreal-engine, question\
**Created:** [September 1, 2021, 11:01am UTC](https://forums.unrealengine.com/t/how-could-you-graph-a-polar-equation-on-a-material/488270 "2021-09-01T11:01:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Paul\_Drauz-Brown](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Paul\_Drauz-Brown](https://forums.unrealengine.com/u/Paul_Drauz-Brown)\
**Post date:** [September 1, 2021, 11:01am UTC](https://forums.unrealengine.com/t/how-could-you-graph-a-polar-equation-on-a-material/488270/1 "2021-09-01T11:01:44Z")

</div>

I’m trying to create a material that can display an arbitrary polar equation, for instance a rose pattern using the equation “r = a sin nθ”. Ideally I could just switch out the “Active Function” node to create a new pattern.

I saw this thread here, but it seems to be more for modifying texture UVs:

> [@Polar Coordinate Material Function](https://forums.unrealengine.com/t/polar-coordinate-material-function/1496):
>
> So I’ve been playing around with this to test material functions. [[image] ](https://i.imgur.com/NorWuEz.jpg) There’s a slight error at the top middle where the texture wraps radially. Looks like the I’m getting values of something like 0.01 to 0.99 instead of 0.0 to 1.0, which is annoying. Not sure why that’s happening. If I can get it to work I’ll try to post it up so anyone can use it.

Here’s an image of my material, the custom cosine node just returns the result of cos(CoordX):

 ![347808-1.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/b/5/bb59dff060303b6590d2c435dcb8191c59e88729.png)

The custom “Draw Graph” node may messing things up too but I don’t know. (Function shown in image)

Any help would be massively appreciated, thanks!

---

<div class="post-metadata">

**Author:** ![Kehel18](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kehel18](https://forums.unrealengine.com/u/Kehel18)\
**Post date:** [September 1, 2021, 4:30pm UTC](https://forums.unrealengine.com/t/how-could-you-graph-a-polar-equation-on-a-material/488270/2 "2021-09-01T16:30:11Z")

</div>

Hello! Yo can just express radial equation with X, Y and after that use **if** node that will check equation with some accuracy level. **if** node is very simple: you give it A and B and diffrent values for A \> B, A == B, A \< B cases…
