Math & Scripting Flashcards

(85 cards)

1
Q

What are the components of the numeral system used in CG?

A

Integers (Z): -1, 0, 1, 2, 3
Rational Numbers (Q): ½, ¼, 1/3
Real Numbers (R)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the definition of a Cartesian coordinate system?

A

A rectangular system with potentially infinite size.
It uses ordered pairs like (x, y).
Attention: Axis directions can vary. Houdini uses a Y-Up right-handed system, while Unreal uses a Z-Up left-handed system.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the origin of a Cartesian coordinate system?

A

The point (0, 0).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What does “orthogonal” mean in the context of 3D axes?

A

Each axis is perpendicular to the others.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What coordinate system does Houdini use compared to Unreal?

A

Houdini: Y-Up, right-handed system.
Unreal: Z-Up, left-handed system.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the result of multiplying a number by -1 in VEX?

A

Multiplying a number by -1 negates it, e.g., negate(3) = -3.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the result of negate(3) and negate(-3) in VEX?

A

negate(3) = -3
negate(-3) = 3

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the result of 2 * (-1) and -2 * (-1)?

A

2 * (-1) = -2
-2 * (-1) = 2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How do you calculate 2 / 4 in mathematical terms?

A

2 / 4 = 0.5
2 * (0.125) = 0.5

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How do you invert the power 2³?

A

Use 1/3, the inverse of 3.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Write the summation formula for n elements.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Write the summation formula for six elements.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the complement of 0.7 in percentages?

A

1 - 0.7 = 0.3 = 30%

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Define a mathematical function.

A

A relationship between two quantities, written as 𝑓 (𝑥) = 𝑦.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is the absolute value of -3?

A

abs(-3) = 3

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What are the results of the following rounding operations: round(4.2), floor(4.8), and ceil(4.8)?

A

round(4.2) = 4
floor(4.8) = 4
ceil(4.8) = 5

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What is the minimum of 3 and 4?

A

min(3, 4) = 3

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What is the result of clamp(8, 1, 4)?

A

4

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What is the result of fit(5, 0, 10, 0, 1)?

A

0.5

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

How do you calculate the mean of the following numbers: 2, 4, 5, 1, 2, 23, 2, 4, 0?

A

Sum: 43
Mean: 43 / 9 ≈ 4.78

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

Why are triangles fundamental in CG?

A

They are the simplest polygon.
They are planar and can define complex surfaces.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

What are the main types of entities in Houdini?

A

Points
Point Clouds
Primitives (Lines, Triangles, Quads, etc.)
Vertices

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

List the common datatypes in Houdini.

A

Integer (int; i@)
Float (float; f@)
Vector (vector; v@)
Matrix (matrix; 4@)
String (string; s@)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

What are the Run Over Modes in Houdini’s Attribute VOP nodes?

A

Points
Primitives
Vertices
Detail (only once)
Numbers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Define sin(α), cos(α), and tan(α).
sin(α) = opposite / hypotenuse cos(α) = adjacent / hypotenuse tan(α) = opposite / adjacent
26
How do you convert 180° to radians?
180° = π radians
27
How do you generate random values in VEX?
Use rand(x), where x is the seed value.
28
Name three types of noises in CG.
Gradient Noise Perlin Noise Simplex Noise
29
What is a fractal?
A geometric shape with detailed structure and self-similarity.
30
What is the basic idea of the Mandelbrot set pseudo-algorithm?
For each pixel (Px, Py):
31
Scale coordinates.
32
Iterate while x2+y2≤4x2+y2≤4 and max iterations not reached.
33
Compute xtempxtemp​, update x,yx,y, and color based on iteration.
34
What is the syntax for declaring attributes in VEX?
@name for geometry attributes. name for local variables.
35
What does the operator != mean in VEX?
Not equal
36
What is the difference between a for loop and a while loop in VEX?
for loop: The iterator value should not be changed inside the loop. while loop: The iterator value is usually changed inside the loop.
37
Why is linear algebra important in CG?
It provides tools for transformations (scaling, translation, rotation) and solving systems of equations.
38
What is a scalar?
A single numerical value, e.g., 45, 2.5, or 1.85.
39
What does the cross product of two vectors produce?
A perpendicular vector to the two input vectors.
40
What is the result of normalizing a vector?
A unit vector (length = 1).
41
What is the formula for the dot product?
a⋅b = ax​⋅bx​+ay​⋅by​+az​⋅bz​
42
Write the formula for the cross product of two vectors.
43
What is the result of lerp(1, 2, 0.5)?
1.5
44
What is a distance field used for in CG?
To measure the distance to a point or surface in space.
45
What is a step function used for in defining shapes?
To create a rectangle.
46
What type of programming language is VEX based on?
C/C++
47
What are the Run Over Modes in Wrangle Nodes?
Points (parallel) Primitives (parallel) Vertices (parallel) Detail (only once) Numbers
48
What are the key Houdini variables used in VEX?
@ptnum, @primnum @numpt, @numprim @Frame, @TimeInc
49
Write an example of an if-else statement in VEX.
if (condition) { // Instructions } else { // Alternate instructions }
50
Name three math-related functions in VEX.
sin() cos() fit()
51
Write a sample "Hello World" function in VEX.
void helloWorld() { printf("helloWorld"); } helloWorld();
52
How do you write a multi-line comment in VEX?
/* This is a multi-line comment */
53
How do you convert 1 radian to degrees?
54
Provide an example of a random function in VEX using sin.
float ran(vector2 st) { return frac(sin(dot(st.xy, set(12.9898, 78.233))) * 43758.5453123); }
55
What distinguishes gradient noise from value noise?
Gradient noise uses a lattice of random gradients. Value noise uses a lattice of points with random values, interpolating between surrounding lattice points.
56
What are the key features of Perlin Noise?
It produces smooth, continuous randomness. It is used for textures, terrains, and natural-looking randomness.
57
What is Simplex Noise?
A more computationally efficient version of Perlin Noise with fewer artifacts.
58
What does LERP stand for, and what does it do?
Linear Interpolate (LERP) interpolates linearly between two values.
59
What is the purpose of the clamp function?
To restrict a value within a given range.
60
What is the use of the fit function in CG?
To map a value from one range to another.
61
What does the normalize function do in VEX?
It converts a vector into a unit vector with a length of 1.
62
How do you calculate the magnitude (length) of a vector?
63
What is the dot product of two vectors used for?
To measure the relative angle or direction between them.
64
What does the cross product of two vectors represent?
A vector perpendicular to the plane formed by the two vectors.
65
What is the primary purpose of matrices in CG?
To perform transformations such as scaling, translation, and rotation.
66
What are the core components of linear algebra in CG?
Vectors Matrices Transformations (scaling, translation, rotation)
67
What is a scalar in linear algebra?
A single number representing magnitude without direction.
68
Why are triangles used as a fundamental structure in 3D modeling?
They are the simplest polygon, planar, and can define complex surfaces.
69
What are points and vertices in Houdini?
Points: Locations in 3D space. Vertices: Points that describe a primitive's surface.
70
What are some common primitive types in Houdini?
Lines Triangles Quads
71
What is the difference between a float and an integer in Houdini datatypes?
Integer (int; i@): Whole numbers (e.g., -5, 0, 10). Float (float; f@): Decimal numbers (e.g., 0.5, -12.01).
72
How do you declare a vector in Houdini?
Using the vector datatype: vector v = {1, 2, 3};
73
What is VEX, and what is it used for?
VEX is a high-performance expression language in Houdini, used for manipulating geometry and attributes.
74
What are Wrangle Nodes in Houdini?
Nodes that allow scripting in VEX for geometry manipulation.
75
Name two boolean operators in VEX and their meanings.
&&: AND ||: OR
76
What is the purpose of a for loop in VEX?
To execute a block of code a specific number of times.
77
What is the difference between a local variable and a global attribute in VEX?
Local variable: Exists only within the wrangle context. Global attribute: Attached to geometry and accessible throughout the scene.
78
What is the significance of comments in VEX?
They are notes in the code that are ignored during execution, used for documentation.
79
How do you write a single-line comment in VEX?
// This is a single-line comment
80
Name two advanced resources for learning VEX.
JoyOfVex (cgWiki) SideFX’s VEX Isn’t Scary tutorial
81
What is a practical use of the fit function in Houdini?
To remap attribute values for shading, animation, or geometry manipulation.
82
How does a left-handed coordinate system differ from a right-handed one?
In a left-handed system, the positive z-axis extends forward. In a right-handed system, the positive z-axis extends backward.
83
84
85