File:3-ary Boolean functions in octeract graph; quaestor 01.svg
Original file (SVG file, nominally 2,100 × 2,100 pixels, file size: 170 KB)
Captions
Summary[edit]
Description3-ary Boolean functions in octeract graph; quaestor 01.svg | Hasse diagram of 3-ary Boolean functions with the following ones highlighted: [1, 25, 37, 61, 67, 91, 103, 127, 128, 152, 164, 188, 194, 218, 230, 254] | ||
Source | Own work | ||
Author |
|
Source code[edit]
This is the one file of this kind that shows the Python code used to create the SVG source.
The rest of the lines marked with <!-- etc. -->
can be found in the SVG source of File:Octeract Petrie polygon.svg.
The description of that file includes the rest of the Python code used to generate this graph.
Python and SVG source |
---|
red_functions = [1, 25, 37, 61, 67, 91, 103, 127, 128, 152, 164, 188, 194, 218, 230, 254]
svg_coordinates = [('0.0', '1000.0'), ('-382.683', '923.88'), ('-324.423', '783.227'), ('-707.107', '707.107'), ('-216.773', '675.577'), ('-599.456', '599.456'), ('-541.196', '458.804'), ('-923.88', '382.683'), ('-76.12', '617.317'), ('-458.804', '541.196'), ('-400.544', '400.544'), ('-783.227', '324.423'), ('-292.893', '292.893'), ('-675.577', '216.773'), ('-617.317', '76.12'), ('-1000.0', '0.0'), ('76.12', '617.317'), ('-306.563', '541.196'), ('-248.303', '400.544'), ('-630.986', '324.423'), ('-140.652', '292.893'), ('-523.336', '216.773'), ('-465.076', '76.12'), ('-847.759', '0.0'), ('0.0', '234.633'), ('-382.683', '158.513'), ('-324.423', '17.86'), ('-707.107', '-58.26'), ('-216.773', '-89.79'), ('-599.456', '-165.911'), ('-541.196', '-306.563'), ('-923.88', '-382.683'), ('216.773', '675.577'), ('-165.911', '599.456'), ('-107.651', '458.804'), ('-490.334', '382.683'), ('0.0', '351.153'), ('-382.683', '275.033'), ('-324.423', '134.381'), ('-707.107', '58.26'), ('140.652', '292.893'), ('-242.031', '216.773'), ('-183.771', '76.12'), ('-566.454', '0.0'), ('-76.12', '-31.53'), ('-458.804', '-107.651'), ('-400.544', '-248.303'), ('-783.227', '-324.423'), ('292.893', '292.893'), ('-89.79', '216.773'), ('-31.53', '76.12'), ('-414.214', '0.0'), ('76.12', '-31.53'), ('-306.563', '-107.651'), ('-248.303', '-248.303'), ('-630.986', '-324.423'), ('216.773', '-89.79'), ('-165.911', '-165.911'), ('-107.651', '-306.563'), ('-490.334', '-382.683'), ('0.0', '-414.214'), ('-382.683', '-490.334'), ('-324.423', '-630.986'), ('-707.107', '-707.107'), ('324.423', '783.227'), ('-58.26', '707.107'), ('0.0', '566.454'), ('-382.683', '490.334'), ('107.651', '458.804'), ('-275.033', '382.683'), ('-216.773', '242.031'), ('-599.456', '165.911'), ('248.303', '400.544'), ('-134.381', '324.423'), ('-76.12', '183.771'), ('-458.804', '107.651'), ('31.53', '76.12'), ('-351.153', '0.0'), ('-292.893', '-140.652'), ('-675.577', '-216.773'), ('400.544', '400.544'), ('17.86', '324.423'), ('76.12', '183.771'), ('-306.563', '107.651'), ('183.771', '76.12'), ('-198.912', '0.0'), ('-140.652', '-140.652'), ('-523.336', '-216.773'), ('324.423', '17.86'), ('-58.26', '-58.26'), ('0.0', '-198.912'), ('-382.683', '-275.033'), ('107.651', '-306.563'), ('-275.033', '-382.683'), ('-216.773', '-523.336'), ('-599.456', '-599.456'), ('541.196', '458.804'), ('158.513', '382.683'), ('216.773', '242.031'), ('-165.911', '165.911'), ('324.423', '134.381'), ('-58.26', '58.26'), ('0.0', '-82.392'), ('-382.683', '-158.513'), ('465.076', '76.12'), ('82.392', '0.0'), ('140.652', '-140.652'), ('-242.031', '-216.773'), ('248.303', '-248.303'), ('-134.381', '-324.423'), ('-76.12', '-465.076'), ('-458.804', '-541.196'), ('617.317', '76.12'), ('234.633', '0.0'), ('292.893', '-140.652'), ('-89.79', '-216.773'), ('400.544', '-248.303'), ('17.86', '-324.423'), ('76.12', '-465.076'), ('-306.563', '-541.196'), ('541.196', '-306.563'), ('158.513', '-382.683'), ('216.773', '-523.336'), ('-165.911', '-599.456'), ('324.423', '-630.986'), ('-58.26', '-707.107'), ('0.0', '-847.759'), ('-382.683', '-923.88'), ('382.683', '923.88'), ('0.0', '847.759'), ('58.26', '707.107'), ('-324.423', '630.986'), ('165.911', '599.456'), ('-216.773', '523.336'), ('-158.513', '382.683'), ('-541.196', '306.563'), ('306.563', '541.196'), ('-76.12', '465.076'), ('-17.86', '324.423'), ('-400.544', '248.303'), ('89.79', '216.773'), ('-292.893', '140.652'), ('-234.633', '0.0'), ('-617.317', '-76.12'), ('458.804', '541.196'), ('76.12', '465.076'), ('134.381', '324.423'), ('-248.303', '248.303'), ('242.031', '216.773'), ('-140.652', '140.652'), ('-82.392', '0.0'), ('-465.076', '-76.12'), ('382.683', '158.513'), ('0.0', '82.392'), ('58.26', '-58.26'), ('-324.423', '-134.381'), ('165.911', '-165.911'), ('-216.773', '-242.031'), ('-158.513', '-382.683'), ('-541.196', '-458.804'), ('599.456', '599.456'), ('216.773', '523.336'), ('275.033', '382.683'), ('-107.651', '306.563'), ('382.683', '275.033'), ('0.0', '198.912'), ('58.26', '58.26'), ('-324.423', '-17.86'), ('523.336', '216.773'), ('140.652', '140.652'), ('198.912', '0.0'), ('-183.771', '-76.12'), ('306.563', '-107.651'), ('-76.12', '-183.771'), ('-17.86', '-324.423'), ('-400.544', '-400.544'), ('675.577', '216.773'), ('292.893', '140.652'), ('351.153', '0.0'), ('-31.53', '-76.12'), ('458.804', '-107.651'), ('76.12', '-183.771'), ('134.381', '-324.423'), ('-248.303', '-400.544'), ('599.456', '-165.911'), ('216.773', '-242.031'), ('275.033', '-382.683'), ('-107.651', '-458.804'), ('382.683', '-490.334'), ('0.0', '-566.454'), ('58.26', '-707.107'), ('-324.423', '-783.227'), ('707.107', '707.107'), ('324.423', '630.986'), ('382.683', '490.334'), ('0.0', '414.214'), ('490.334', '382.683'), ('107.651', '306.563'), ('165.911', '165.911'), ('-216.773', '89.79'), ('630.986', '324.423'), ('248.303', '248.303'), ('306.563', '107.651'), ('-76.12', '31.53'), ('414.214', '0.0'), ('31.53', '-76.12'), ('89.79', '-216.773'), ('-292.893', '-292.893'), ('783.227', '324.423'), ('400.544', '248.303'), ('458.804', '107.651'), ('76.12', '31.53'), ('566.454', '0.0'), ('183.771', '-76.12'), ('242.031', '-216.773'), ('-140.652', '-292.893'), ('707.107', '-58.26'), ('324.423', '-134.381'), ('382.683', '-275.033'), ('0.0', '-351.153'), ('490.334', '-382.683'), ('107.651', '-458.804'), ('165.911', '-599.456'), ('-216.773', '-675.577'), ('923.88', '382.683'), ('541.196', '306.563'), ('599.456', '165.911'), ('216.773', '89.79'), ('707.107', '58.26'), ('324.423', '-17.86'), ('382.683', '-158.513'), ('0.0', '-234.633'), ('847.759', '0.0'), ('465.076', '-76.12'), ('523.336', '-216.773'), ('140.652', '-292.893'), ('630.986', '-324.423'), ('248.303', '-400.544'), ('306.563', '-541.196'), ('-76.12', '-617.317'), ('1000.0', '0.0'), ('617.317', '-76.12'), ('675.577', '-216.773'), ('292.893', '-292.893'), ('783.227', '-324.423'), ('400.544', '-400.544'), ('458.804', '-541.196'), ('76.12', '-617.317'), ('923.88', '-382.683'), ('541.196', '-458.804'), ('599.456', '-599.456'), ('216.773', '-675.577'), ('707.107', '-707.107'), ('324.423', '-783.227'), ('382.683', '-923.88'), ('0.0', '-1000.0')]
svg_vertices = ''
for i in range(256):
if i in red_functions:
bg_color = 'f00'
else:
bg_color = 'fff'
x_svg = svg_coordinates[i][0]
y_svg = svg_coordinates[i][1]
svg_vertices += '<circle cx="%s" cy="%s" r="14.5" fill="#%s"/>' % (x_svg, y_svg, bg_color)
svg_string = """<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" width="2100" height="2100" viewBox="-1050 -1050 2100 2100">
<<!-- Nowiki tags do not work here. -->!-- edges -->
<g style="stroke:#000; stroke-width:1.5; stroke-opacity:0.3;">
<line x1="0.0" y1="1000.0" x2="-382.683" y2="923.88"/> <<!-- Nowiki tags do not work here. -->!-- etc. -->
</g>
<<!-- Nowiki tags do not work here. -->!-- vertices -->
<g style="stroke:#000; stroke-width:1.5px;">
%s
</g>
<<!-- Nowiki tags do not work here. -->!-- tiny dots -->
<circle cx="-11.098" cy="997.793" r="1.8"/><circle cx="-371.586" cy="926.087" r="1.8"/> <<!-- Nowiki tags do not work here. -->!-- etc. -->
<<!-- Nowiki tags do not work here. -->!-- numbers -->
<g style="text-anchor: middle; letter-spacing: -1;" font-size="10px" font-family="sans-serif" transform="translate(0, 3.7)" fill-opacity="0.5">
<text x="0.0" y="1000.0">0</text> <<!-- Nowiki tags do not work here. -->!-- etc. -->
</g>
</svg>""" % (svg_vertices)
svg_file = open('3-ary Boolean functions in octeract graph; related to 4-ary functions with weight 1; 01.svg', 'w')
svg_file.write(svg_string)
|
Licensing[edit]
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled GNU Free Documentation License.http://www.gnu.org/copyleft/fdl.htmlGFDLGNU Free Documentation Licensetruetrue |
- You are free:
- to share – to copy, distribute and transmit the work
- to remix – to adapt the work
- Under the following conditions:
- attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 14:46, 23 June 2016 | 2,100 × 2,100 (170 KB) | Watchduck (talk | contribs) | {{Information |Description ={{en|1=foo}} |Source ={{own}} |Author ={{Watchduck}} |Date = |Permission = |other_versions = }} |
You cannot overwrite this file.
File usage on Commons
The following 4 pages use this file:
File usage on other wikis
The following other wikis use this file:
- Usage on en.wikiversity.org
Metadata
This file contains additional information such as Exif metadata which may have been added by the digital camera, scanner, or software program used to create or digitize it. If the file has been modified from its original state, some details such as the timestamp may not fully reflect those of the original file. The timestamp is only as accurate as the clock in the camera, and it may be completely wrong.
Width | 2100 |
---|---|
Height | 2100 |