<p>In the context of 3D graphics, is the use of <code>cos</code> and <code>sin</code> <strong>always</strong> related to getting the x and y coordinate of the angle? Or is there any other use for them? and if so, what are some examples?</p>
<p>The <code>cos</code> and <code>sin</code> are extremely useful functions. The values they produce have all sorts of applications. However, in the context of this question, I'm only interested in the &quot;raw&quot; values produced by them, not how those values go on to be interpreted as part of other operations.</p>
<p>These are all the &quot;raw&quot; uses that I'm aware off:</p>
<ol>
<li>For unit vectors: Get the x-, and y- coordinates of unit vectors.</li>
<li>For non-unit vectors: Get the ratio of the adjacent and opposite sides of triangles to their hypotenuse.</li>
<li>Used as part of the definition of other trig functions.</li>
</ol>

CC BY-SA 4.0
2024-11-25T12:15:52.763Z
In graphics we go to great lengths to avoid directly calling transcendental functions like sin and cos. That said, cos can be computed from the dot product of two normalized vectors and is used so heavily and in so many creative ways that I can't imagine CG without it. sin can be computed from the cross product of two normalized vectors but isn't used as much.
pmw1234
CC BY-SA 4.0
2024-11-26T13:58:38.067Z
@pmw1234 - The projection of the dot product onto the orthonormal vectors ihat and jhat does coincide with the values of cos and sin of a unit vectors. In that context, that projection is also related to x-, and y-coordinates.
Dess
CC BY-SA 4.0
2024-11-26T22:09:17.927Z
It sounds like this question needs to be in one of the math stack exchange's. Dot product doesn't give x or y values it generates a scalar. And vectors don't have locations they have direction and magnitude, independent of the coordinate system. And again, cos and sin aren't used heavily in CG. Good Luck
pmw1234
<3d>
Additional uses of sin and cos
Dess
# Additional uses of sin and cos

(Asked by: username_0 on 2024-11-24)

In the context of 3D graphics, is the use of `cos` and `sin` **always** related to getting the x and y coordinate of the angle? Or is there any other use for them? and if so, what are some examples?

The `cos` and `sin` are extremely useful functions. The values they produce have all sorts of applications. However, in the context of this question, I'm only interested in the "raw" values produced by them, not how those values go on to be interpreted as part of other operations.

These are all the "raw" uses that I'm aware off:

1. For unit vectors: Get the x-, and y- coordinates of unit vectors.
2. For non-unit vectors: Get the ratio of the adjacent and opposite sides of triangles to their hypotenuse.
3. Used as part of the definition of other trig functions.

**Tags:** 3d

> **Comments:**
> **username_1**: In graphics we go to great lengths to avoid directly calling transcendental functions like sin and cos. That said, cos can be computed from the dot product of two normalized vectors and is used so heavily and in so many creative ways that I can't imagine CG without it. sin can be computed from the cross product of two normalized vectors but isn't used as much.  
> **username_0**: @username_1 - The projection of the dot product onto the orthonormal vectors ihat and jhat does coincide with the values of cos and sin of a unit vectors. In that context, that projection is also related to x-, and y-coordinates.  
> **username_1**: It sounds like this question needs to be in one of the math stack exchange's. Dot product doesn't give x or y values it generates a scalar. And vectors don't have locations they have direction and magnitude, independent of the coordinate system. And again, cos and sin aren't used heavily in CG. Good Luck  

---

## 0 answers

