File:Rendering of thalassa like planet 1 1.png

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Original file(2,400 × 1,800 pixels, file size: 1.71 MB, MIME type: image/png)

Captions

Captions

Thalassa-like ocean planet

Summary

[edit]
Description
English: Thalassa-like ocean planet
Date
Source Own work
Author Author: ;ChatGPT: Python coding; Most on POV coding

Python code to generate map of planet. Mainly ChatGPT ai coded stuff.

import numpy as np import matplotlib.pyplot as plt import pyfastnoisesimd as fns import imageio

  1. Korkeuskartan generointi pyfastnoisesimd-kirjastolla

def generate_fastnoise_simd(size_x=8000, size_y=4000, scale=0.05, octaves=6, persistence=0.5, lacunarity=2.0, seed=None):

   noise = fns.Noise(seed=seed)
   noise.frequency = scale
   noise.noiseType = fns.NoiseType.SimplexFractal
   noise.fractal.octaves = octaves
   noise.fractal.lacunarity = lacunarity
   noise.fractal.gain = persistence
   
   noise_map = noise.genAsGrid([size_y, size_x])
   
   # Normalisoidaan kartoitus välille 0-1
   max_noise = noise_map.max()
   min_noise = noise_map.min()
   noise_map = (noise_map - min_noise) / (max_noise - min_noise)
   
   return noise_map
  1. Lisätään kaareva saarijono sin-funktioilla

def add_curved_island_chain(noise_map, width=100, height=1000, amplitude=50, frequency=0.005):

   size_y, size_x = noise_map.shape
   center_x = size_x // 2
   center_y = size_y // 2
   for i in range(size_y):
       for j in range(size_x):
           # Käytä sin-funktiota vääristämään saarijono
           offset = int(amplitude * np.sin(frequency * (i - center_y)))
           distance = ((i - center_y) ** 2 / height ** 2) + ((j - (center_x + offset)) ** 2 / width ** 2)
           if distance < 1:
               # Korotetaan korkeutta ellipsin alueella säilyttäen fraktaalipinnan
               noise_map[i, j] += 0.5 * (1 - distance)
   
   # Normalisoidaan kartta uudelleen
   max_noise = np.max(noise_map)
   min_noise = np.min(noise_map)
   noise_map = (noise_map - min_noise) / (max_noise - min_noise)
   return noise_map
  1. Generoidaan lämpötilakartta

def generate_temperature_map(size_x=8000, size_y=4000, noise_scale=0.05, seed=None):

   noise = fns.Noise(seed=seed)
   noise.frequency = noise_scale
   noise.noiseType = fns.NoiseType.Simplex
   temperature_map = noise.genAsGrid([size_y, size_x])
   
   # Normalisoidaan lämpötilakartta välille 0-1
   max_temp = temperature_map.max()
   min_temp = temperature_map.min()
   temperature_map = (temperature_map - min_temp) / (max_temp - min_temp)
   
   return temperature_map
  1. Määritellään kasvillisuusvyöhykkeet lämpötilan ja korkeuskartan perusteella

def assign_vegetation_zones(temperature_map, noise_map, sea_level=0.8, shallow_sea_level=0.85):

   vegetation_map = np.zeros_like(temperature_map)
   for i in range(temperature_map.shape[0]):
       for j in range(temperature_map.shape[1]):
           if noise_map[i, j] < sea_level:
               if noise_map[i, j] < shallow_sea_level:
                   vegetation_map[i, j] = 0  # Matalat vedet (turkoosi)
               else:
                   vegetation_map[i, j] = 0.2  # Syvä meri (sininen)
           elif temperature_map[i, j] < 0.3:
               vegetation_map[i, j] = 0.1  # Aavikko (ruskea)
           elif temperature_map[i, j] < 0.6:
               vegetation_map[i, j] = 0.5  # Pensaat ja kuiva maa
           else:
               vegetation_map[i, j] = 1.0  # Metsä (vihreä)
   return vegetation_map
  1. Muunna kasvillisuuskartta RGB-matriisiksi

def convert_vegetation_to_rgb(vegetation_map):

   colors = {
       0.0: [0, 0, 127],   # Sininen meri
       0.1: [165, 42, 42], # Ruskea aavikko
       0.2: [64, 224, 208],# Turkoosi matalat vedet
       0.5: [173, 255, 47],# Vihreä pensaat ja kuiva maa
       1.0: [34, 139, 34]  # Tummanvihreä metsä
   }
   rgb_map = np.zeros((vegetation_map.shape[0], vegetation_map.shape[1], 3), dtype=np.uint8)
   for key in colors:
       rgb_map[np.where(vegetation_map == key)] = colors[key]
   return rgb_map
  1. Piirretään kasvillisuuskartta RGB-kuvana

def plot_vegetation_map_rgb(rgb_map):

   plt.imshow(rgb_map, interpolation='nearest')
   plt.title('Kasvillisuuskartta')
   plt.xlabel('X-akseli')
   plt.ylabel('Y-akseli')
   plt.show()
  1. Koko prosessin suoritus

if __name__ == "__main__":

   size_x = 8000
   size_y = 4000
   octaves = 5
   persistence = 0.5
   lacunarity = 2.0
   scale = 0.02
   width = 200
   height = 1000
   amplitude = 100
   frequency = 0.01
   sea_level = 0.85
   shallow_sea_level = 0.8
   # Generoidaan korkeuskartta
   noise_map = generate_fastnoise_simd(size_x=size_x, size_y=size_y, scale=scale, octaves=octaves, persistence=persistence, lacunarity=lacunarity)
   noise_map_with_island_chain = add_curved_island_chain(noise_map, width=width, height=height, amplitude=amplitude, frequency=frequency)
   # Generoidaan lämpötilakartta
   temperature_map = generate_temperature_map(size_x=size_x, size_y=size_y, noise_scale=scale)
   # Määritellään kasvillisuusvyöhykkeet lämpötilan ja korkeuskartan perusteella
   vegetation_map = assign_vegetation_zones(temperature_map, noise_map_with_island_chain, sea_level=sea_level, shallow_sea_level=shallow_sea_level)
   # Muunna kasvillisuuskartta RGB-matriisiksi
   rgb_map = convert_vegetation_to_rgb(vegetation_map)
   # Visualisoidaan kartat
   plot_vegetation_map_rgb(rgb_map)
   # Tallenna kasvillisuuskartta RGB-kuvana
   imageio.imwrite('vegetation_map.png', rgb_map)
   # Muunna kasvillisuuskartta, jossa meri on mustana, PNG-muotoon
   rgb_map_with_black_sea = np.copy(rgb_map)
   rgb_map_with_black_sea[np.all(rgb_map == [0, 0, 127], axis=-1)] = [0, 0, 0]  # Syvä meri mustaksi
   imageio.imwrite('vegetation_map_black_sea.png', rgb_map_with_black_sea)


POV-Ray code to render planet: most coding ChatGPT AI

// Alustus global_settings {

   assumed_gamma 1.0
   max_trace_level 10
   #include "colors.inc"
   #include "textures.inc"

}

// Kamera ja valo camera {

   location <0, 0, -10>*0.25
   look_at <0, 0, 0>

}

light_source {

   <10, 20, -100>*1000*1000*1000
   color rgb <1, 1, 1>*1

}

// Pallon pinta

  1. declare planet1=sphere {
   <0, 0, 0>, 1.00 // Keskipiste ja säde
   texture {
       pigment {
           color rgb <0, 0, 0.2> // Syvän meren sininen
       }
   }
texture {
       pigment {
           image_map {
               // gif "vegetation_map_black_sea.gif"
               png "vegetation_map.png" 
               map_type 0
              once
               interpolate 2 // Tasainen interpolointi
               // filter 0, 9 // Väri 0:lle 50% läpinäkyvyys            
       }
      // translate y*-0.5              
      // scale 0.3      
       }
       finish {
         //  ambient 0.2
          // diffuse 0.8
       }
   }

}



// Planeetan pilvet

  1. declare clouds1=sphere {
   <0, 0, 0>, 1.00
   texture {
       pigment {
       //    agate
          // granite
           wrinkles scale 0.1
           
       warp { turbulence 1.0}
            color_map {
           [0 color rgbt <1,1,1,1>]
           [0.5 color rgbt <1,1,1,1>] 
          [1 color rgbt <1,1,1,0>] 
          }       
       }
       finish {
           ambient 0.0
           diffuse 0.5
           specular 0.02
       }
   


}

  rotate y*270

}

// rayleigh based atm
  1. declare atm_thickness1 = 0.02;
  2. declare atm_color1 = rgb <pow(460/650, 4), pow(460/555, 4), 1>;
  3. declare atm_amount1=1;


  1. declare atm_density1 = density

{

    function
    {

// 1*exp(-6.7*(sqrt(x*x+(y)*(y)+z*z)- 1 - 0.00001)/atm_thickness1)

   //   1*exp(-6.7*(sqrt(x*x+(y)*(y)+z*z)-1- 0.00001)/atm_thickness1)
 
   1*exp(-8*(sqrt(x*x+(y)*(y)+z*z)- 1 - 0.00001)/atm_thickness1) 
 

} }

  1. declare atm_media1 = media

{

    method 3
    intervals 3
    samples 3
    scattering
    { 4

color atm_amount1*atm_color1/atm_thickness1 // extinction 1

    }
    density {atm_density1}

}

  1. declare atmos1 = difference

{

    sphere {0, 1.00001 + atm_thickness1}
 //   sphere {0, 1.00001}
    hollow
    pigment {rgbt 1}
    interior {media{atm_media1}}

}





union {

object {planet1} object {clouds1 scale 1.01}


object {atmos1 scale 1.01} rotate y*150 rotate x*-30 }


Licensing

[edit]
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.


Public domain
This file is in the public domain because it is the work of a computer algorithm or artificial intelligence and does not contain sufficient human authorship to support a copyright claim.

The United Kingdom and Hong Kong provide a limited term of copyright protection for computer-generated works of 50 years from creation. [1] [2]
AI derivative works Legal disclaimer
Most image-generating AI models were trained using works that are protected by copyright. In some cases, such assets and models can produce images that contain major copyrightable elements of those copyrighted training images, making these outputs derivative works. Accordingly, there is a risk that AI-generated art uploaded on Commons may violate the rights of the authors of the original works. See Commons:AI-generated media for additional details.

azərbaycanca  Deutsch  English  español  français  galego  हिन्दी  日本語  português do Brasil  русский  slovenščina  Türkçe  Tiếng Việt  中文  中文(简体)  中文(繁體)  +/−

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current10:58, 20 June 2024Thumbnail for version as of 10:58, 20 June 20242,400 × 1,800 (1.71 MB)Merikanto (talk | contribs)Update
13:05, 18 June 2024Thumbnail for version as of 13:05, 18 June 20242,400 × 1,800 (1.18 MB)Merikanto (talk | contribs)Uploaded own work with UploadWizard

There are no pages that use this file.

Metadata