numerics 0.1.0
Loading...
Searching...
No Matches
viz.hpp File Reference

Lightweight real-time visualization layer for numerics apps. More...

#include <algorithm>
#include <cstdarg>
#include <cstdint>
#include <cstdio>
#include <raylib.h>
#include <raymath.h>
#include <vector>

Go to the source code of this file.

Classes

struct  num::viz::Color
 
struct  num::viz::detail::FieldCanvas
 
struct  num::viz::detail::State
 
struct  num::viz::Frame
 
struct  num::viz::Frame::Cam3
 

Namespaces

namespace  num
 
namespace  num::viz
 
namespace  num::viz::detail
 

Functions

inline ::Color num::viz::to_rl (Color c)
 
Color num::viz::from_rl (::Color c)
 
Color num::viz::unpack (uint32_t c)
 
Color num::viz::heat_color (float t)
 Heat colormap for \(t\in[0,1]\).
 
Color num::viz::diverging_color (float t)
 Diverging colormap for \(t\in[-1,1]\).
 
Color num::viz::phase_hsv_color (double prob, double phase, double max_prob)
 Phase/probability colormap for quantum wavefunctions.
 
Color num::viz::lerp_color (Color a, Color b, float t)
 
template<class DrawFn >
void num::viz::run (const char *title, int w, int h, DrawFn draw, Color bg={15, 15, 15, 255})
 

Variables

constexpr Color num::viz::kBlack = {0, 0, 0, 255}
 
constexpr Color num::viz::kWhite = {255, 255, 255, 255}
 
constexpr Color num::viz::kRed = {220, 40, 40, 255}
 
constexpr Color num::viz::kGreen = {50, 200, 50, 255}
 
constexpr Color num::viz::kBlue = {50, 100, 230, 255}
 
constexpr Color num::viz::kYellow = {240, 220, 30, 255}
 
constexpr Color num::viz::kGray = {120, 120, 120, 255}
 
constexpr Color num::viz::kSkyBlue = {100, 180, 240, 255}
 

Detailed Description

Lightweight real-time visualization layer for numerics apps.

Definition in file viz.hpp.