a fast method to create a pnmimage from a perlinnoise

Registered by Hypnos

a implementation of perlinnoise to pnmimage could make python usage of perlinnoise much more useful.

eighter a function that does something like:

class TerrainGenerator:
  def __init__(self):
    # create the perlinnoise functions
    seed = 2
    self.noiseDict = dict()
    for scale in [1,2,4,8,16,32,64,128,256,512,1024,2048,4096,8192]:
      noise = PerlinNoise2(1./scale, 1./scale, 4096, seed)
      self.noiseDict[1./scale] = noise

  def getHeight(self, x, y):
    x = x/5000.
    y = -y/5000.
    height = 0
    for scale, func in self.noiseDict.items():
      height += func.noise(x,y) * float(scale)
    return (height + 1.) / 4.

or a method to convert a noise into a image, and image functions which allow adding.
dummy code:
pnmImg1 = perlin2pnm(imageSize, noiseScaleX, noiseScaleY, tableSize, seed)
newImg = pnmImg1*0.25+pnmImg2*0.5+pnmImg3*1

actually method 2 would be more useful (but slower)

Blueprint information

Status:
Not started
Approver:
None
Priority:
Undefined
Drafter:
None
Direction:
Needs approval
Assignee:
None
Definition:
New
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.