Help me understand love.math.noise usage properly...

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
User avatar
zorg
Party member
Posts: 3441
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: Help me understand love.math.noise usage properly...

Post by zorg »

raidho36 wrote: Sun Jun 04, 2017 6:51 am It's "artifact". It's a latin word, there's no alternative spelling.
1. You apparently lack some sense of humo(u)r.
2. The brits and aussies would disagree: https://en.wiktionary.org/wiki/artefact
3. The american version is the modified one: https://en.wiktionary.org/wiki/artifact#English
And the latin was arte factum. :3
100% no chill.
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
User avatar
raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

Re: Help me understand love.math.noise usage properly...

Post by raidho36 »

Well, you don't spell "arteficial", so why are you spelling "artefact"?
User avatar
zorg
Party member
Posts: 3441
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: Help me understand love.math.noise usage properly...

Post by zorg »

raidho36 wrote: Sun Jun 04, 2017 7:11 am Well, you don't spell "arteficial", so why are you spelling "artefact"?
(from wiktionary)
ablative singular of ars => arte + -factum ("thing made") => arte factum.
dative singular of ars => arti + -fex (“suffix representing a maker or producer”) => artifex + -ium => artificium (n.) => artificialis (adj.)

But again, the second didn't have a variant split, so it's just a case of traditional vs simplified variants for the first only. :megagrin:
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
MachineCode
Citizen
Posts: 70
Joined: Fri Jun 20, 2014 1:33 pm

Re: Help me understand love.math.noise usage properly...

Post by MachineCode »

The noise function is very interesting once you understand what it is doing. The best explanation I came across was to create a random value at regular intervals 0, 1, 2, 3 ... and then draw a smooth curve through them. The value at any point of the curve is then given by noise(x). Extend this to 2, 3, 4 dimensions and you get noise (or perlin) spaces. To make interesting noise, you need to add together noise functions with different intervals - like:

value = k1.noise(x) + k2.noise(2x) + k3.noise(3x) + k4.noise(4x) where each component is more squiggly then the previous one, and has a weight value. This is how you can make different types of terrain.

Anyone who is familiar with the fourier series will see an interesting thing here. If we consider the noise(x) to be like a randomised version of a sine wave, then the composite perlin noise above looks like a type of harmonic series, just using squiggles instead of sine waves. In audio, "white noise" is a waveform that is made up of all frequencies. Is there a counterpart in the fractals and perlin noise? One way to approximate white noise would be to add lots of noise(x) functions with different scales. To make pure "white noise fractals" you actually need to to an iterative calculation which is a random walk. Each iteration you flip a coin and either add or subtract a small delta value from your running total. This will give a noise function that is the equivalent of audio white noise.

I was playing around with a fractal generator for spherical surfaces (planet surface). The iterative way to do this is to take a unit sphere where every height on the surface is initially zero. Each iteration, select a random point inside the sphere and create a plane normal to that vector. Flip a coin and depending on the result, either increment or decrement all points on the surface that are on the opposite side of the plane to the origin. After about 5,000 iterations you will have a nice white noise height map for the planet surface. It seems that the way you make the noise gives a unique characteristic to the image produced.
pog-01-S.jpg
pog-01-S.jpg (15.08 KiB) Viewed 3270 times
This is quite an old article, but it actually has some good diagrams

http://web.archive.org/web/201603251341 ... perlin.htm
DarkShroom
Citizen
Posts: 86
Joined: Mon Jul 17, 2017 2:07 pm

Re: Help me understand love.math.noise usage properly...

Post by DarkShroom »

actually according to the oxford dictionary, "artifact" is the american version, we have been programmed by americans again!
User avatar
zorg
Party member
Posts: 3441
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: Help me understand love.math.noise usage properly...

Post by zorg »

DarkShroom wrote: Sun Jul 23, 2017 2:40 pm actually according to the oxford dictionary, "artifact" is the american version, we have been programmed by americans again!
zorg wrote: Sun Jun 04, 2017 6:58 am 3. The american version is the modified one: https://en.wiktionary.org/wiki/artifact#English
Already said that. :P
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Post Reply

Who is online

Users browsing this forum: No registered users and 25 guests