File:15-bit RGB Cube.gif

Uploaded by Kjerish
Upload date 2017-01-09T05:22:36Z
MIME type image/gif
Dimensions 400 × 400 px
File size 5.4 MB

Summary

Description
English: 15-bit RGB Cube
Date
Source Own work
Author Kjerish
Other versions

Licensing

Kjerish, the copyright holder of this work, hereby publishes it under the following license:
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 4.0 International license.
Attribution:
You are free:
  • to share – to copy, distribute and transmit the work
  • to remix – to adapt the work
Under the following conditions:
  • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
  • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.

Source code

Python code
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.animation import FuncAnimation
from mpl_toolkits.mplot3d import Axes3D

bits=5
fig = plt.figure()
fig.subplots_adjust(left=0, bottom=0, right=1, top=1)
ax = fig.add_subplot(111, projection='3d')
ax.set_axis_bgcolor((0.5, 0.5, 0.5))
gradient = np.linspace(0, 1, 2**bits)
X,Y,Z = np.meshgrid(gradient, gradient, gradient)
colors=np.stack((X.flatten(),Y.flatten(),Z.flatten()),axis=1)
ax.scatter(X,Y,Z,alpha=1.0,s=100./2**bits,c=colors,marker='o',linewidth='0')

def update(i):
    ax.view_init(elev=20., azim=i)
    return fig, ax

if __name__ == '__main__':
    plt.axis('off')
    fig.set_size_inches(5, 5)
    anim = FuncAnimation(fig, update, frames=np.arange(0, 360, 2), repeat=True)
    anim.save('%d-bit_color.gif' %(3*bits), dpi=80, writer='imagemagick', fps=24)

Captions

Add a one-line explanation of what this file represents

Items portrayed in this file

depicts

8 January 2017

image/gif

0bee1fb6e0f2f5bbf342ae6d521441bb3a0c9ca4

5,653,244 byte

400 pixel

400 pixel

7.2000000000000055 second

Category:Animated GIF files Category:CC-BY-SA-4.0 Category:N-bit RGB cube animations on gray background Category:Self-published work