vault backup: 2023-11-08 08:38:13
This commit is contained in:
21
TC/Ćwiczenia/Minimalizacja.md
Normal file
21
TC/Ćwiczenia/Minimalizacja.md
Normal file
@@ -0,0 +1,21 @@
|
||||
F =
|
||||
|
||||
Kod ![[Minimalizacja 2023-10-24 15.05.07.excalidraw]]
|
||||
|
||||
Kod graya:
|
||||
LSB mirrored, MSB Negated
|
||||
00
|
||||
01
|
||||
11
|
||||
10
|
||||
|
||||
|z|x|c|
|
||||
|-|-|-|
|
||||
|0|0|0|
|
||||
|0|0|1|
|
||||
|0|1|1|
|
||||
|0|1|0|
|
||||
|1|1|0|
|
||||
|1|1|1|
|
||||
|1|0|1|
|
||||
|1|0|0|
|
||||
@@ -19,3 +19,78 @@
|
||||
|
||||
%%za a+a=a^2 ban na życie%%
|
||||
|
||||
```
|
||||
\documentclass{article}
|
||||
\usepackage[rgb]{xcolor}
|
||||
\usepackage{karnaugh-map}
|
||||
\usepackage{pgfplots}
|
||||
\pgfplotsset{compat=1.16}
|
||||
\definecolor{mycolor0000}{HTML}{F70400}
|
||||
\definecolor{mycolor0100}{HTML}{AA0154}
|
||||
\definecolor{mycolor1100}{HTML}{5600AB}
|
||||
\definecolor{mycolor1000}{HTML}{0003FB}
|
||||
\definecolor{mycolor0001}{HTML}{FF5500}
|
||||
\definecolor{mycolor0101}{HTML}{AA5455}
|
||||
\definecolor{mycolor1101}{HTML}{5555AB}
|
||||
\definecolor{mycolor1001}{HTML}{0055FE}
|
||||
\definecolor{mycolor0011}{HTML}{FFAA01}
|
||||
\definecolor{mycolor0111}{HTML}{AAA956}
|
||||
\definecolor{mycolor1111}{HTML}{56AAAA}
|
||||
\definecolor{mycolor1011}{HTML}{00AAFF}
|
||||
\definecolor{mycolor0010}{HTML}{FEFF02}
|
||||
\definecolor{mycolor0110}{HTML}{A9FF54}
|
||||
\definecolor{mycolor1110}{HTML}{55FFAA}
|
||||
\definecolor{mycolor1010}{HTML}{0FF6FF}
|
||||
|
||||
|
||||
\pgfplotsset{colormap={BR}{%
|
||||
color(0)=(mycolor0000) color(1)=(mycolor0100) color(2)=(mycolor1100) color(3)=(mycolor1000)
|
||||
color(4)=(mycolor0001) color(5)=(mycolor0101) color(6)=(mycolor1101) color(7)=(mycolor1001)
|
||||
color(8)=(mycolor0011) color(9)=(mycolor0111) color(10)=(mycolor1111) color(11)=(mycolor1011)
|
||||
color(12)=(mycolor0010) color(13)=(mycolor0110) color(14)=(mycolor1110) color(15)=(mycolor1010)
|
||||
}}
|
||||
\begin{document}
|
||||
|
||||
\begin{tikzpicture}[font=\small\sffamily]
|
||||
\begin{axis}
|
||||
[hide axis,shader=flat corner,%colormap name=BR,
|
||||
plot box ratio = 1 6 1,
|
||||
view = {0}{15}]
|
||||
\addplot3[surf,
|
||||
samples=32,point meta={int(mod(-atan2(y,x)+45+360,360)/90)+
|
||||
4*int(mod(atan2(z,sqrt(x^2+y^2)-2)+360+180,360)/90)
|
||||
},domain=0:360,y domain=0:360,
|
||||
z buffer=sort]
|
||||
({(2+cos(x))*cos(y+90)},
|
||||
{(2+cos(x))*sin(y+90)},
|
||||
{sin(x)});
|
||||
\node at ({(2+cos(45))*cos(-90)},{(2+cos(45))*sin(-90)},{cos(45)}) {0111};
|
||||
\node at ({(2+cos(45))*cos(-90)},{(2+cos(45))*sin(-90)},{0.15-cos(45)}) {0101};
|
||||
\fill ({(2-cos(45))*cos(90-50)},{(2-cos(45))*sin(90-50)},{cos(80)}) circle (1mm);
|
||||
\end{axis}
|
||||
\end{tikzpicture}
|
||||
%
|
||||
\begin{karnaugh-map}[4][4][1][][]
|
||||
\end{karnaugh-map}
|
||||
\end{document}
|
||||
```
|
||||
```tikz
|
||||
\usepackage{karnaugh}
|
||||
\usepackage{pgfplots}
|
||||
\begin{axis}
|
||||
[hide axis,shader=flat corner,
|
||||
plot box ratio = 1 6 1,
|
||||
view = {0}{15}]
|
||||
\addplot3[surf,
|
||||
samples=32,point meta={int(mod(-atan2(y,x)+45+360,360)/90)+
|
||||
4*int(mod(atan2(z,sqrt(x^2+y^2)-2)+360+180,360)/90)
|
||||
},domain=0:360,y domain=0:360,
|
||||
z buffer=sort]
|
||||
({(2+cos(x))*cos(y+90)},
|
||||
{(2+cos(x))*sin(y+90)},
|
||||
{sin(x)});
|
||||
\node at ({(2+cos(45))*cos(-90)},{(2+cos(45))*sin(-90)},{cos(45)}) {0111};
|
||||
\node at ({(2+cos(45))*cos(-90)},{(2+cos(45))*sin(-90)},{0.15-cos(45)}) {0101};
|
||||
\fill ({(2-cos(45))*cos(90-50)},{(2-cos(45))*sin(90-50)},{cos(80)}) circle (1mm);
|
||||
\end{axis}
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user