How Can I Calculate the Range of Values for Vector Math in 3D Art?

  • Context: Undergrad 
  • Thread starter Thread starter davidjonas
  • Start date Start date
  • Tags Tags
    3d Art Vector
Click For Summary
SUMMARY

The discussion focuses on calculating the range of values for vector v in 3D vector math, specifically in the context of generative art algorithms. David Jonas presents a scenario where a random vector u(x,y,z) forms an angle α with a reference vector w(0,1,0). The goal is to generate vector v such that the resultant vector r=u+v maintains an angle with w within the range [α-C, α+C]. The mathematical condition for this relationship is established using the cosine formula, which relates the dot product and magnitudes of the vectors involved.

PREREQUISITES
  • Understanding of 3D vector mathematics
  • Familiarity with trigonometric functions and angles
  • Knowledge of dot product and vector magnitudes
  • Experience with generative art algorithms
NEXT STEPS
  • Study vector addition and its geometric implications in 3D space
  • Learn about the cosine rule in vector mathematics
  • Research techniques for generating random vectors within specified constraints
  • Explore applications of vector math in generative art projects
USEFUL FOR

Software developers, 3D artists, and anyone involved in generative art who seeks to understand vector math and its applications in creating dynamic visual content.

davidjonas
Messages
1
Reaction score
0
Hi!

I am a software developer and at the moment I am working on media art projects dealing with generative art algorithms in 3D spaces. I have been stuck for a few hours with a little problem dealing with vector math and I can't reach a conclusion. If someone here could give me a little hand it would be greatly apreciated!

I have a random vector u(x,y,z) and a vector w(0,1,0). Vector u makes an angle of [tex]\alpha[/tex] with w.
I want to generate a vector v, from random values, only making sure that the vector r=u+v makes an angle with w in the range [[tex]\alpha[/tex]-C, [tex]\alpha[/tex]+C] (being C a constant value).

What I need is to find a way to calculate the range of values for xv, yv, zv that obey to the referred condition.

If someone knows how this can be done or has any sugestions, tips, concepts to research, directions or anything that could be even slightly helpfull please do not hesitate in replying, every try to help is apreciated.

Thank you in advance!

David Jonas
 
Physics news on Phys.org
If ##\varphi## is the angle between ##\mathbf{w}## and ##\mathbf{r}=\mathbf{u}+\mathbf{v}## then we have
$$
\cos \varphi = \dfrac{\langle\mathbf{r},\mathbf{w} \rangle}{||\mathbf{r}||\cdot ||\mathbf{w}||}= \dfrac{r_y}{||\mathbf{r}||}= \dfrac{u_y+v_y}{\sqrt{\left( u_x+v_x \right)^2+\left( u_y+v_y \right)^2+\left( u_z+v_z \right)^2}}
$$
This is the condition you have. Now there are many possible choices for ##\mathbf{v}## which has been to be expected in 3D space.
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 4 ·
Replies
4
Views
9K
Replies
6
Views
4K
Replies
2
Views
2K
  • · Replies 26 ·
Replies
26
Views
6K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
Replies
3
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K