All Projects → stumpycr → stumpy_core

stumpycr / stumpy_core

Licence: MIT License
Core components for working with images

Programming Languages

crystal
512 projects

Projects that are alternatives of or similar to stumpy core

papers
Summarizing the papers I have read (Japanese)
Stars: ✭ 38 (+35.71%)
Mutual labels:  computer-graphics
MineCube
A Cool Voxel Editor Based on OpenGL 3.3+ !
Stars: ✭ 23 (-17.86%)
Mutual labels:  computer-graphics
opengl-demos
A list of small OpenGL applications to demonstrate concepts of Computer Graphics
Stars: ✭ 33 (+17.86%)
Mutual labels:  computer-graphics
GX-EncinoWaves
Graphics Experiment - FFT Ocean Water Simulation
Stars: ✭ 34 (+21.43%)
Mutual labels:  computer-graphics
FontRNN
Implementation of FontRNN [Computer Graphics Forum, 2019].
Stars: ✭ 27 (-3.57%)
Mutual labels:  computer-graphics
ComputerGraphics-OpenGL
No description or website provided.
Stars: ✭ 25 (-10.71%)
Mutual labels:  computer-graphics
CubbyFlow
Voxel-based fluid simulation engine for computer games
Stars: ✭ 215 (+667.86%)
Mutual labels:  computer-graphics
DOT
Decomposed Optimization Time Integration (DOT) is a domain-decomposed optimization method for fast, reliable simulation of deformation dynamics. DOT efficiently converges with frame-rate time-steps across a wide range of extreme conditions.
Stars: ✭ 37 (+32.14%)
Mutual labels:  computer-graphics
ICON
ICON: Implicit Clothed humans Obtained from Normals (CVPR 2022)
Stars: ✭ 641 (+2189.29%)
Mutual labels:  computer-graphics
tiny-path
An instructive one-file Ruby path tracer
Stars: ✭ 53 (+89.29%)
Mutual labels:  computer-graphics
rasterator
Real-time software rasterizer written in C++ with windowing and model loading support.
Stars: ✭ 15 (-46.43%)
Mutual labels:  computer-graphics
computer-graphics-from-scratch-Notes
my notes of reading the book <computer-graphics-from-scratch>
Stars: ✭ 31 (+10.71%)
Mutual labels:  computer-graphics
snarf
Official code release for ICCV 2021 paper SNARF: Differentiable Forward Skinning for Animating Non-rigid Neural Implicit Shapes.
Stars: ✭ 184 (+557.14%)
Mutual labels:  computer-graphics
glText
Cross-platform single header text rendering library for OpenGL
Stars: ✭ 93 (+232.14%)
Mutual labels:  computer-graphics
Super-Sunshine
A ray-tracer with a simple scene description language for easily generating beautiful images.
Stars: ✭ 115 (+310.71%)
Mutual labels:  computer-graphics
WebGL-Billiards
ThreeJS based 8-ball pool
Stars: ✭ 28 (+0%)
Mutual labels:  computer-graphics
Nabla
OpenGL/OpenGL ES/Vulkan/CUDA/OptiX Modular Rendering Framework for PC/Linux/Android
Stars: ✭ 235 (+739.29%)
Mutual labels:  computer-graphics
vktut
Shabi's Vulkan Tutorials
Stars: ✭ 88 (+214.29%)
Mutual labels:  computer-graphics
neuraltexture
Learning a Neural 3D Texture Space from 2D Exemplars [CVPR 2020]
Stars: ✭ 88 (+214.29%)
Mutual labels:  computer-graphics
ProceduralTerrain
Polygon is a procedural mesh generator in Unity.
Stars: ✭ 18 (-35.71%)
Mutual labels:  computer-graphics

stumpy_core

Documentation

Usage

This library is not very useful on its own but there are a few other libraries that allow creating a canvas from an image file or saving one to an image file.

require "stumpy_core"

include StumpyCore

rainbow = Canvas.new(256, 256)
(0...255).each do |x|
  (0...255).each do |y|
    # RGBA.from_rgb_n(values, bit_depth) is an internal helper method
    # that creates an RGBA object from a rgb triplet with a given bit depth
    color = RGBA.from_rgb_n(x, y, 255, 8)
    rainbow[x, y] = color
  end
end

# It is also possible to provide a background color,
# the default is transparent black `RGBA.new(0, 0, 0, 0)`
white = Canvas.new(256, 256, RGBA.from_hex("#ffffff"))

# If the colors for all pixels are already known when creating the canvas,
# the block syntax can be used to simplify the code:

rainbow2 = Canvas.new(256, 256) { |x, y| RGBA.from_rgb_n(x, y, 255, 8) }

checkerboard = Canvas.new(256, 256) do |x, y|
  if ((x / 32) + (y / 32)).odd?
    RGBA.from_hex("#ffffff")
  else
    RGBA.from_hex("#000000")
  end
end

spectrum  = Canvas.new(361, 101) { |x, y| RGBA.from_hsl(x, 100, y) }
spectrum2 = Canvas.new(361, 101) { |x, y| RGBA.from_hsba([x, 100, y], 1) }

rainbow image checkerboard image spectrum image spectrum2 image

Contributors

Thanks goes to these wonderful people (emoji key):


Leon

💻

Ian Rash

💻

Sam

💻

reiswindy

📖

This project follows the all-contributors specification. Contributions of any kind welcome!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].