File:XOR texture.png

Summary

Description
Русский: Процедурная текстура, полученная вычислением функции XOR (исключающее ИЛИ).
Polski: Proceduralna tekstura, uzyskana poprzez obliczenie funkcji XOR (XOR).
English: Procedural texture obtained by computing the XOR (exclusive OR) function.
Date
Source Own work
Author Vort
Other versions

C++ Source Code

#include <fstream>

int main()
{
	std::ofstream file;
	file.open("xor.ppm");
	file << "P2 256 256 255\n";
	for (int i = 0; i < 256; i++)
		for (int j = 0; j < 256; j++)
			file << (i ^ j) << ' ';
	file.close();
	return 0;
}

To compile:

  g++ d.cpp -Wall


to run :

  ./a.out

Licensing

I, the copyright holder of this work, hereby publish it under the following license:
Creative Commons CC-Zero This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication.
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.

Category:CC-Zero#XOR%20texture.pngCategory:Self-published work
Category:Images with C++ source code Category:Computer-generated textures Category:Grayscale fractals
Category:CC-Zero Category:Computer-generated textures Category:Grayscale fractals Category:Images with C++ source code Category:Self-published work