[go: up one dir, main page]

File:Neighbourhood definition.png

Original file (1,234 × 635 pixels, file size: 69 KB, MIME type: image/png)

Captions

Captions

Add a one-line explanation of what this file represents

Summary

edit
This diagram image could be re-created using vector graphics as an SVG file. This has several advantages; see Commons:Media for cleanup for more information. If an SVG form of this image is available, please upload it and afterwards replace this template with {{vector version available|new image name}}.


It is recommended to name the SVG file “Neighbourhood definition.svg”—then the template Vector version available (or Vva) does not need the new image name parameter.
Description
English: Definition of the neighbourhood rule (4-/8-neighbours) using Latex tikz (adapted from an example on texample.net)
\begin{tikzpicture}[scale=.6,every node/.style={minimum size=1cm},on grid]
%
   \begin{scope}[
           yshift=-83,every node/.append style={
           yslant=0.5,xslant=-1},yslant=0.5,xslant=-1
           ]
       \draw[step=4mm, black] (0,0) grid (5,5);
       \draw[black,very thick] (0,0) rectangle (5,5);
       \fill[red] (2.05,2.05) rectangle (2.35,2.35); % center pixel
       \fill[blue] (1.65,2.05) rectangle (1.95,2.35); %left
       \fill[blue] (2.45,2.05) rectangle (2.75,2.35); % right
       \fill[blue] (2.05,2.45) rectangle (2.35,2.75); % top
       \fill[blue] (2.05,1.95) rectangle (2.35,1.65); % bottom
% 8 -pixel setting
       \fill[blue] (1.65,2.45) rectangle (1.95,2.75); %top-left
       \fill[blue] (2.45,2.45) rectangle (2.75,2.75); %top-right
       \fill[blue] (2.75,1.95) rectangle (2.45,1.65); %bottom-right
       \fill[blue] (1.65,1.95) rectangle (1.95,1.65); %bottom-left
\end{scope}
%
   \begin{scope}[
           yshift=0,every node/.append style={
           yslant=0.5,xslant=-1},yslant=0.5,xslant=-1
           ]
       \fill[white,fill opacity=0.9] (0,0) rectangle (5,5);
       \draw[black,very thick] (0,0) rectangle (5,5);
       \draw[step=4mm, black] (0,0) grid (5,5);
       \fill[red] (2.05,2.05) rectangle (2.35,2.35); %
       \fill[red] (2.05,2.05) rectangle (2.35,2.35); % center pixel
       \fill[blue] (1.65,2.05) rectangle (1.95,2.35); %left
       \fill[blue] (2.45,2.05) rectangle (2.75,2.35); % right
       \fill[blue] (2.05,2.45) rectangle (2.35,2.75); % top
       \fill[blue] (2.05,1.95) rectangle (2.35,1.65); % bottom
   \end{scope}
%
   \draw[-latex,thick,gray!70!black](-3,5)node[left]{The center pixel}
       to[out=0,in=90] (0,2.2);
%
   \draw[-latex,thick,gray!70!black](-3,5)node[left]{ }
       to[out=0,in=90] (0,-.8);
%
   \draw[thick,gray!70!black](6,4) node {4 neighbourhood rule};
%
   \draw[thick,gray!70!black](6,-2) node {8 neighbourhood rule};
%
\end{tikzpicture}
Date
Source Own work
Author Wegmann

Licensing

edit
I, the copyright holder of this work, hereby publish it under the following licenses:
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported license.
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.
  • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
GNU head 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.
You may select the license of your choice.

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current08:30, 5 July 2010Thumbnail for version as of 08:30, 5 July 20101,234 × 635 (69 KB)Wegmann (talk | contribs){{Information |Description={{en|1=Definition of the neighbourhood rule (4-/8-neighbours) using Latex pikz (adapted from an example on texample.net) \begin{tikzpicture}[scale=.6,every node/.style={minimum size=1cm},on grid] \begin{scope}[

The following page uses this file: