Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
chaikin_smoothing_example.cc File Reference

Demonstrates Chaikin corner-cutting polygon smoothing with TikZ output. More...

#include <tikzgeom_algorithms.H>
#include <cassert>
#include <cmath>
#include <iostream>
#include <fstream>
Include dependency graph for chaikin_smoothing_example.cc:

Go to the source code of this file.

Functions

static Polygon make_star (double outer_r=10.0, double inner_r=4.0)
 Build a 5-pointed star polygon centered at the origin.
 
static Polygon make_L_shape ()
 Build an L-shaped polygon.
 
int main ()
 

Detailed Description

Demonstrates Chaikin corner-cutting polygon smoothing with TikZ output.

Definition in file chaikin_smoothing_example.cc.

Function Documentation

◆ main()

◆ make_L_shape()

static Polygon make_L_shape ( )
static

Build an L-shaped polygon.

Definition at line 58 of file chaikin_smoothing_example.cc.

References Aleph::Polygon::add_vertex(), and Aleph::Polygon::close().

Referenced by main().

◆ make_star()

static Polygon make_star ( double  outer_r = 10.0,
double  inner_r = 4.0 
)
static

Build a 5-pointed star polygon centered at the origin.

Definition at line 44 of file chaikin_smoothing_example.cc.

References Aleph::Polygon::add_vertex(), Aleph::Polygon::close(), cos(), Aleph::divide_and_conquer_partition_dp(), r, and sin().