File:Neighbourhood definition2.svg

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Original file (SVG file, nominally 396 × 256 pixels, file size: 34 KB)

Captions

Captions

Add a one-line explanation of what this file represents
Description
English: example of patch numbers with different neighbourhood definitions.
\begin{tikzpicture}[scale=.8,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,thick] (0,0) rectangle (5,5);%borders
       \fill[greenMW] (2.05,2.05) rectangle (2.35,2.35); % center pixel
       \fill[greenMW] (1.65,2.05) rectangle (1.95,2.35); %left
       \fill[greenMW] (2.45,2.05) rectangle (2.75,2.35); %right
       \fill[greenMW] (2.05,2.45) rectangle (2.35,2.75); %top
       \fill[greenMW] (2.05,1.95) rectangle (2.35,1.65); %bottom
% 8 -pixel setting
       \fill[greenMW] (1.65,2.45) rectangle (1.95,2.75); %top-left
       \fill[greenMW] (2.45,2.45) rectangle (2.75,2.75); %top-right
       \fill[greenMW] (2.75,1.95) rectangle (2.45,1.65); %bottom-right
       \fill[greenMW] (1.65,1.95) rectangle (1.95,1.65); %bottom-left
% 2. ring
       \fill[greenMW] (1.25,1.55) rectangle (1.55,1.25); %bottom-left
       \fill[greenMW] (0.85,1.55) rectangle (1.15,1.25); %bottom-left
       \fill[greenMW] (0.85,1.15) rectangle (1.15,0.85); %bottom-left
       \fill[greenMW] (1.25,0.75) rectangle (1.55,0.45); %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[step=4mm, black] (0,0) grid (5,5); %grid definition
       \draw[black,thick] (0,0) rectangle (5,5);%borders
       \fill[greenMW] (2.05,2.05) rectangle (2.35,2.35); % center pixel
       \fill[greenMW] (1.65,2.05) rectangle (1.95,2.35); %left
       \fill[greenMW] (2.45,2.05) rectangle (2.75,2.35); % right
       \fill[greenMW] (2.05,2.45) rectangle (2.35,2.75); % top
       \fill[greenMW] (2.05,1.95) rectangle (2.35,1.65); % bottom
% 4 -pixel setting
       \fill[greenMW] (1.65,2.45) rectangle (1.95,2.75); %top-left
       \fill[greenMW] (2.45,2.45) rectangle (2.75,2.75); %top-right
       \fill[greenMW] (2.75,1.95) rectangle (2.45,1.65); %bottom-right
       \fill[greenMW] (1.65,1.95) rectangle (1.95,1.65); %bottom-left
% 2. ring
       \fill[orange] (1.25,1.55) rectangle (1.55,1.25); 
       \fill[orange] (0.85,1.55) rectangle (1.15,1.25); 
       \fill[orange] (0.85,1.15) rectangle (1.15,0.85); 
       \fill[blue] (1.25,0.75) rectangle (1.55,0.45); 
   \end{scope}
%
% draw annotations
%
   \draw[-latex,thick,orange](-3,5)node[left]{ }
       to[out=0,in=90] (-.4,1.4);
   \draw[-latex,thick,blue](-3,5)node[left]{ }
       to[out=0,in=90] (0.8,1.15);
   \draw[-latex,thick,greenMW](-3,5)node[left]{3 patches}
       to[out=0,in=90] (0,2.8);
%
   \draw[-latex,thick,greenMW](-3,-2)node[left]{1 patch}
       to[out=0,in=200] (-1,-.9);
   \draw[thick,gray!70!black](6,4) node {4 neighbourhood rule};
   \draw[thick,gray!70!black](6,-2) node {8 neighbourhood rule};
%
\end{tikzpicture}
based on an example from texample.net
Date (UTC)
Source
Author


This is a retouched picture, which means that it has been digitally altered from its original version. Modifications: Converted to SVG. The original can be viewed here: Neighbourhood definition2.png. Modifications made by Pablo Castellanos.

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.

Original upload log

[edit]

This image is a derivative work of the following images:

  • File:Neighbourhood_definition2.png licensed with Cc-by-sa-3.0, GFDL
    • 2010-07-05T08:35:08Z Wegmann 1148x692 (67010 Bytes) {{Information |Description={{en|1=example of patch numbers with different neighbourhood definitions. \begin{tikzpicture}[scale=.8,every node/.style={minimum size=1cm},on grid] \begin{scope}[ yshift=-83,ever

Uploaded with derivativeFX

File history

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

Date/TimeThumbnailDimensionsUserComment
current16:58, 25 March 2011Thumbnail for version as of 16:58, 25 March 2011396 × 256 (34 KB)Pablo Castellanos (talk | contribs){{Information |Description={{en|1=example of patch numbers with different neighbourhood definitions. \begin{tikzpicture}[scale=.8,every node/.style={minimum size=1cm},on grid] % \begin{scope}[ yshift=-83,every node/.append style={

The following 2 pages use this file:

File usage on other wikis

The following other wikis use this file: