You are on page 1of 7

In[27]:=

In[28]:=

Out[29]=

In[30]:=

H* define the function *L


coords@8r_, g_, b_<D := 8r 2 + g, r Tan@Pi 3D 2<;
H* testing *L
a = 81, 0, 0<;
coords@aD
:

3
,

>

H* one more testing *L


a = 881, 0, 0<, 80, 1, 0<, 80, 0, 1<<;

Triangleplot.nb

In[31]:=

Graphics@8PointSize@LargeD, RGBColor@D, Point@coords@DD< & a,


Frame True, ImageSize 300D

0.8

0.6

Out[31]= 0.4

0.2

0.0
0.0

In[32]:=

0.2

0.4

0.6

0.8

1.0

H* color data *L
colors = 88"AliceBlue", 8240, 248, 255<<, 8"AntiqueWhite", 8250, 235, 215<<,
8"Aqua", 80, 255, 255<<, 8"Aquamarine", 8127, 255, 212<<, 8"Azure", 8240, 255, 255<<,
8"Beige", 8245, 245, 220<<, 8"Bisque", 8255, 228, 196<<, 8"Black", 80, 0, 0<<,
8"BlanchedAlmond", 8255, 235, 205<<, 8"Blue", 80, 0, 255<<, 8"BlueViolet", 8138, 43, 226<<,
8"Brown", 8165, 42, 42<<, 8"BurlyWood", 8222, 184, 135<<, 8"CadetBlue", 895, 158, 160<<,
8"Chartreuse", 8127, 255, 0<<, 8"Chocolate", 8210, 105, 30<<, 8"Coral", 8255, 127, 80<<,
8"CornflowerBlue", 8100, 149, 237<<, 8"Cornsilk", 8255, 248, 220<<,
8"Crimson", 8220, 20, 60<<, 8"Cyan", 80, 255, 255<<, 8"DarkBlue", 80, 0, 139<<,
8"DarkCyan", 80, 139, 139<<, 8"DarkGoldenrod", 8184, 134, 11<<,
8"DarkGray", 8169, 169, 169<<, 8"DarkGreen", 80, 100, 0<<, 8"DarkKhaki", 8189, 183, 107<<,
8"DarkMagenta", 8139, 0, 139<<, 8"DarkOliveGreen", 885, 107, 47<<,
8"DarkOrange", 8255, 140, 0<<, 8"DarkOrchid", 8153, 50, 204<<, 8"DarkRed", 8139, 0, 0<<,
8"DarkSalmon", 8233, 150, 122<<, 8"DarkSeaGreen", 8143, 188, 143<<,
8"DarkSlateBlue", 872, 61, 139<<, 8"DarkSlateGray", 847, 79, 79<<,
8"DarkTurquoise", 80, 206, 209<<, 8"DarkViolet", 8148, 0, 211<<,
8"DeepPink", 8255, 20, 147<<, 8"DeepSkyBlue", 80, 191, 255<<,
8"DimGray", 8105, 105, 105<<, 8"DodgerBlue", 830, 144, 255<<,
8"FireBrick", 8178, 34, 34<<, 8"FloralWhite", 8255, 250, 240<<,
8"ForestGreen", 834, 139, 34<<, 8"Fuchsia", 8255, 0, 255<<, 8"Gainsboro", 8220, 220, 220<<,
8"GhostWhite", 8248, 248, 255<<, 8"Gold", 8255, 215, 0<<, 8"Goldenrod", 8218, 165, 32<<,
8"Gray", 8128, 128, 128<<, 8"Green", 80, 128, 0<<, 8"GreenYellow", 8173, 255, 47<<,
8"Honeydew", 8240, 255, 240<<, 8"HotPink", 8255, 105, 180<<, 8"IndianRed", 8205, 92, 92<<,
8"Indigo", 875, 0, 130<<, 8"Ivory", 8255, 255, 240<<, 8"Khaki", 8240, 230, 140<<,
8"Lavender", 8230, 230, 250<<, 8"LavenderBlush", 8255, 240, 245<<,
8"LawnGreen", 8124, 252, 0<<, 8"LemonChiffon", 8255, 250, 205<<,
8"LightBlue", 8173, 216, 230<<, 8"LightCoral", 8240, 128, 128<<,
8"LightCyan", 8224, 255, 255<<, 8"LightGoldenrodYellow", 8250, 250, 210<<,
8"LightGreen", 8144, 238, 144<<, 8"LightGrey", 8211, 211, 211<<,
8"LightPink", 8255, 182, 193<<, 8"LightSalmon", 8255, 160, 122<<,
8"LightSeaGreen", 832, 178, 170<<, 8"LightSkyBlue", 8135, 206, 250<<,
8"LightSlateGray", 8119, 136, 153<<, 8"LightSteelBlue", 8176, 196, 222<<,
8"LightYellow", 8255, 255, 224<<, 8"Lime", 80, 255, 0<<, 8"LimeGreen", 850, 205, 50<<,
,
,
,

Triangleplot.nb

8"Linen", 8250, 240, 230<<, 8"Magenta", 8255, 0, 255<<, 8"Maroon", 8128, 0, 0<<,
8"MediumAquamarine", 8102, 205, 170<<, 8"MediumBlue", 80, 0, 205<<,
8"MediumOrchid", 8186, 85, 211<<, 8"MediumPurple", 8147, 112, 219<<,
8"MediumSeaGreen", 860, 179, 113<<, 8"MediumSlateBlue", 8123, 104, 238<<,
8"MediumSpringGreen", 80, 250, 154<<, 8"MediumTurquoise", 872, 209, 204<<,
8"MediumVioletRed", 8199, 21, 133<<, 8"MidnightBlue", 825, 25, 112<<,
8"MintCream", 8245, 255, 250<<, 8"MistyRose", 8255, 228, 225<<,
8"Moccasin", 8255, 228, 181<<, 8"NavajoWhite", 8255, 222, 173<<, 8"Navy", 80, 0, 128<<,
8"OldLace", 8253, 245, 230<<, 8"Olive", 8128, 128, 0<<, 8"OliveDrab", 8107, 142, 35<<,
8"Orange", 8255, 165, 0<<, 8"OrangeRed", 8255, 69, 0<<, 8"Orchid", 8218, 112, 214<<,
8"PaleGoldenrod", 8238, 232, 170<<, 8"PaleGreen", 8152, 251, 152<<,
8"PaleTurquoise", 8175, 238, 238<<, 8"PaleVioletRed", 8219, 112, 147<<,
8"PapayaWhip", 8255, 239, 213<<, 8"PeachPuff", 8255, 218, 185<<, 8"Peru", 8205, 133, 63<<,
8"Pink", 8255, 192, 203<<, 8"Plum", 8221, 160, 221<<, 8"PowderBlue", 8176, 224, 230<<,
8"Purple", 8128, 0, 128<<, 8"Red", 8255, 0, 0<<, 8"RosyBrown", 8188, 143, 143<<,
8"RoyalBlue", 865, 105, 225<<, 8"SaddleBrown", 8139, 69, 19<<,
8"Salmon", 8250, 128, 114<<, 8"SandyBrown", 8244, 164, 96<<, 8"SeaGreen", 846, 139, 87<<,
8"Seashell", 8255, 245, 238<<, 8"Sienna", 8160, 82, 45<<, 8"Silver", 8192, 192, 192<<,
8"SkyBlue", 8135, 206, 235<<, 8"SlateBlue", 8106, 90, 205<<, 8"SlateGray", 8112, 128, 144<<,
8"Snow", 8255, 250, 250<<, 8"SpringGreen", 80, 255, 127<<, 8"SteelBlue", 870, 130, 180<<,
8"Tan", 8210, 180, 140<<, 8"Teal", 80, 128, 128<<, 8"Thistle", 8216, 191, 216<<,
8"Tomato", 8255, 99, 71<<, 8"Turquoise", 864, 224, 208<<, 8"Violet", 8238, 130, 238<<,
8"Wheat", 8245, 222, 179<<, 8"White", 8255, 255, 255<<, 8"WhiteSmoke", 8245, 245, 245<<,
8"Yellow", 8255, 255, 0<<, 8"YellowGreen", 8154, 205, 50<<<;
In[33]:=

namedcolors = colors@@All, 2DD; namedcolors = Drop@namedcolors, 8D;

In[34]:=

cg = Graphics@8PointSize@LargeD, RGBColor@ 255D, Disk@coords@ Total@DD, 0.01D< &


namedcolors, ImageSize 300D

Out[34]=

Triangleplot.nb

In[35]:=

cl = Graphics@8Thick, Line@880, 0<, 81, 0<, 80.5, Sqrt@3D 2<, 80, 0<<D<, ImageSize 300D

Out[35]=

In[36]:=

rl = GraphicsB
TableB:Dotted, RGBColor@i 255, 0, 0D, LineB::0 + i 255
:1 - i 255

3 2 Tan@30 DegreeD, i 255

3 2>>F>,

8i, 256 * 0.1, 256 * 0.9, 256 * 0.1<F, ImageSize 300F

Out[36]=

3 2 Tan@30 DegreeD, i 255

3 2>,

Triangleplot.nb

In[37]:=

bl = GraphicsBTableB:Dotted, RGBColor@0, 0, i 255D,


RotateBLineB::0 + i 255
:1 - i 255

3 2 Tan@30 DegreeD, i 255

3 2 Tan@30 DegreeD, i 255

3 2>,

3 2>>F, 120 Degree, :0.5,

8i, 256 * 0.1, 256 * 0.9, 256 * 0.1<F, ImageSize 300F

3 6>F>,

Out[37]=

In[38]:=

gl =

GraphicsBTableB:Dotted, RGBColor@0, i 255, 0D, RotateBLineB::0 + i 255


i 255

3 2>, :1 - i 255

-120 Degree, :0.5,

Out[38]=

3 2 Tan@30 DegreeD, i 255

3 2>>F,

3 2 Tan@30 DegreeD,

3 6>F>, 8i, 256 * 0.1, 256 * 0.9, 256 * 0.1<F, ImageSize 300F

Triangleplot.nb

In[39]:=

tg = GraphicsB:Text@Style@"B", Blue, Medium, BoldD, 80 - 0.02, 0 - 0.02<D,


Text@Style@"G", Green, Medium, BoldD, 81 + 0.02, 0 - 0.02<D,
TextBStyle@"R", Red, Medium, BoldD, :0.5,

3 2 + 0.02>F>, ImageSize 300F

Out[39]=

Triangleplot.nb

In[40]:=

H* put everything together *L


Show@cl, bl, rl, gl, cg, tg, ImageSize 600D

Out[40]=

You might also like