Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download
255 views
1
'''
2
figures.py - Create all the ColorPy sample figures.
3
4
Description:
5
6
Creates the sample figures.
7
8
This can also create the figures with some non-default initialization conditions.
9
10
Functions:
11
12
figures() -
13
Create all the sample figures.
14
15
figures_clip_clamp_to_zero () -
16
Adjust the color clipping method, and create the sample figures.
17
18
figures_gamma_245 () -
19
Adjust the gamma correction to a power law gamma = 2.45 and create samples.
20
21
figures_white_A () -
22
Adjust the white point (for Luv/Lab) and create sample figures.
23
24
License:
25
26
Copyright (C) 2008 Mark Kness
27
28
Author - Mark Kness - [email protected]
29
30
This file is part of ColorPy.
31
32
ColorPy is free software: you can redistribute it and/or modify
33
it under the terms of the GNU Lesser General Public License as
34
published by the Free Software Foundation, either version 3 of
35
the License, or (at your option) any later version.
36
37
ColorPy is distributed in the hope that it will be useful,
38
but WITHOUT ANY WARRANTY; without even the implied warranty of
39
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
40
GNU Lesser General Public License for more details.
41
42
You should have received a copy of the GNU Lesser General Public License
43
along with ColorPy. If not, see <http://www.gnu.org/licenses/>.
44
'''
45
import colormodels
46
import ciexyz
47
import illuminants
48
import plots
49
import blackbody
50
import rayleigh
51
import thinfilm
52
import misc
53
54
def figures ():
55
'''Create all the ColorPy sample figures.'''
56
# no figures for colormodels and ciexyz
57
colormodels.init() # default
58
illuminants.figures()
59
plots.figures()
60
blackbody.figures()
61
rayleigh.figures()
62
thinfilm.figures()
63
misc.figures()
64
65
def figures_clip_clamp_to_zero ():
66
'''Adjust the color clipping method, and create the sample figures.'''
67
colormodels.init()
68
colormodels.init_clipping (colormodels.CLIP_CLAMP_TO_ZERO)
69
figures()
70
71
def figures_gamma_245 ():
72
'''Adjust the gamma correction to a power law gamma = 2.45 and create samples.'''
73
colormodels.init()
74
colormodels.init_gamma_correction (
75
display_from_linear_function = colormodels.simple_gamma_invert,
76
linear_from_display_function = colormodels.simple_gamma_correct,
77
gamma = 2.45)
78
figures()
79
80
def figures_white_A ():
81
'''Adjust the white point (for Luv/Lab) and create sample figures.'''
82
colormodels.init()
83
colormodels.init_Luv_Lab_white_point (colormodels.WhiteA)
84
figures()
85
86
87