Skip to content

PolyhedralDev/Seismic

Repository files navigation

Seismic

Build Status GitHub Tag Chat

A Java sampler, math, type, and utility library, primarily for use in Polyhedral Development projects.

About

Seismic is a Java sampler, math, type and utility library, with a wide selection of functions and types. It started out as simply a fork of FastNoiseLite that broke up the monolithic class into separate classes for each sampler, but has since grown to include a much wider selection of samplers and features, including math functions, types, and utilities. Where there is overlap with Java's Math class it is assumed that Seismic's functions are faster, sometimes trading a reasonable amount of accuracy or handling of special floating point values.

Seismic is lightweight and only depends on JetBrains' Annotations and SLF4J. However, it is recommended to use Seismic with a HotSpot based JDK as Seismic hooks into HotSpot's internals for optimal performance.

Features

Seismic contains a wide selection of samplers, math utilities, and types including:

Samplers

Gradient:

  • OpenSimplex2
  • OpenSimplex2S
  • Simplex
  • Perlin
  • Value
  • Cubically Interpolated Value Noise
  • Gabor Noise

Fractal:

  • Brownian Motion
  • Ping-Pong
  • Ridged Fractal

Random:

  • Gaussian Noise
  • White Noise
  • Positive White Noise

Other Noise:

  • Cellular (Voronoi/Worley)

Mutator:

  • Domain Warp
  • Cubic Spline
  • Translate
  • Linear Heightmap
  • Fractal Gavoro Pseudoerosion

Arithmetic:

  • Addition
  • Subtraction
  • Multiplication
  • Division
  • Max
  • Min

Normalizer:

  • Linear
  • Linear Map
  • Clamp
  • Posterization
  • Probability
  • Scale
  • Normal

Exotic Sampler:

  • Image
  • Kernel
Math Functions

Algebra:

  • Inverse Square Root

Arithmetic:

  • Fused Multiply Add

Floating Point:

  • Epsilon Equals
  • Round
  • Floor
  • Ceiling
  • Fraction

Integer:

  • Squash
  • Integer Power of Ten
  • Integer Logarithm Base Two Ceiling
  • Integer Logarithm Base Two Floor
  • Integer Logarithm Base Ten Ceiling
  • Integer Logarithm Base Ten Floor

Numerical Analysis:

Interpolation:

  • Linear
  • Bilinear
  • Trilinear
  • Cubic
  • Bicubic
  • Tricubic

Smoothstep:

  • Cubic Polynomial
  • Quartic Polynomial
  • Quintic Polynomial
  • Cubic Rational
  • Quartic Rational

Statistic:

  • Standard Deviation
  • Normal Inverse

Trigonometry:

  • Sine
  • Cosine
  • Tangent
  • Secant
  • Cosecant
  • Cotangent
Types

Sampler:

  • Sampler
  • Derivative Sampler

Vector:

  • Vector2
  • Vector2Int
  • Vector3
  • Vector3Int

Enum:

  • Rotation
  • Distance Function

Other:

  • Cubic Spline
Utilities

Access Controller:

  • Do Privileged

HotSpot VM Options:

  • Get Property

VM Constants:

  • Is Client VM
  • Is HotSpot VM
  • Is JVMCI VM
  • Get JVM Vendor
  • Get OS Name
  • Is Linux
  • Is Windows
  • Is SunOS
  • Is MacOS
  • Is FreeBSD
  • Get OS Arch
  • Get Java Vendor
  • Get Has Fast Vector FMA
  • Get Has Fast Scalar FMA

Reflection:

  • Get Class
  • Get Method
  • Get Field
  • Set Field To Public
  • Set Method To Public

Unsafe:

  • Get Static Field Object
  • Get Static Field Char
  • Get Static Field Int
  • Get Static Field Long
  • Get Static Field Float
  • Get Static Field Double
  • Get Static Field Boolean
  • Put Static Field Object
  • Put Static Field Char
  • Put Static Field Int
  • Put Static Field Long
  • Put Static Field Float
  • Put Static Field Double
  • Put Static Field Boolean
  • Get Field Object
  • Get Field Char
  • Get Field Int
  • Get Field Long
  • Get Field Float
  • Get Field Double
  • Get Field Boolean
  • Put Field Object
  • Put Field Char
  • Put Field Int
  • Put Field Long
  • Put Field Float
  • Put Field Double
  • Put Field Boolean

Licensing

Seismic is licensed under the GNU Lesser General Public License (LGPL), version 3.0. It includes code from:

Additionally, it contains trivial and/or CC0 code from various other sources.