General-purpose programming language used widely in game development and CPU-intensive tasks.
Questions tagged [c++]
205 questions
2
votes
1 answer
Environment map importance sampling (beginner)
beginner here.
I am implementing importance sampling for environment maps in Scotty3D, a CMU CS project (but I am not a student).
The task can be found here
I have a problem with the sample's pdf, it is unusually small and that results in the object…
Pachiko
- 21
- 1
1
vote
1 answer
Point respect to plane
How do I classify a point with respect to a plane, returning whether the point is inside, outside, or coplanar?
I know that if a point is on the plane the Dot product + the plane distance would equal to 0, but what does inside, outside, and coplanar…
MOJOMO
- 21
- 3
1
vote
0 answers
Selecting pixels within a circle having a decimal (non integer) radius
I want to select a pixel within a circle of a certain radius. But the radius is expressed in a decimal form (0.12). What does it mean to have a radius equal to 0.12? And concretely how to pick a pixel within a circle having such a radius?
S.E.K.
- 141
- 1
- 5
0
votes
0 answers
Write CPP program, DFA and NFA diagram for DFA accepting string with length 5 and starting at 0 , ending at 1 input(0, 1)
I am having trouble in making this program and DFA:-
Write CPP program, DFA and NFA diagram for DFA accepting string with
length 5 and starting at 0 , ending at 1 input(0, 1).
Priyank
- 1
0
votes
1 answer
Understanding how gradient noise generation works
When attempting to compute the gradient noise derivatives I've seen the use of a function named "hash" and I don't understand its purpose (nor why they have commented that it should be replaced by something better): link
Code:
vec2 hash( in vec2 x )…