Giter Club home page Giter Club logo

fractalterraingeneration's People

Contributors

flamershaftglutton avatar

Watchers

 avatar

fractalterraingeneration's Issues

[SIMPLEX] red and blue values of the colors inverted

In simplex, the colors are described in a struct containing an array of 3 
elements (v[0]=red, v[1]=green, v[2]=blue) and are used like that in the whole 
program, except while writting in the BMP file, where the following is done:

out.put(char(newcolor.v[0]));//blue
out.put(char(newcolor.v[1]));//green
out.put(char(newcolor.v[2]));//red

In a BMP file, the blue value has to be written first, as you mentionned it in 
your comment, however, you're writting the red first.
The main effect of this is that your colors array contains actually blue, green 
and red values, see your waterlow value for example: (55,0,0). This is more red 
than blue.

It can be fixed by replacing those 3 lines by:

out.put(char(newcolor.v[2]));//blue
out.put(char(newcolor.v[1]));//green
out.put(char(newcolor.v[0]));//red

And then the colors red and blue values must be inverted (for example, waterlow 
must become (0, 0, 55).

It's actually less visible with the other colors, because their red and blue 
values are always near.


Original issue reported on code.google.com by [email protected] on 9 Aug 2013 at 3:50

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.