What is the minimum number of rectangles in a #Visio chessboard?

This may sound like a simple question with a definite answer, but I think it is worthy of further explanation. I wanted to make a chessboard shape with as few lines as possible, because it makes the shape more efficient and easy to work with. Some might consider grouping 64 squares together, but that would be a very heavy shape. A chessboard needs to appear to have 64 squares, but the following shape only has 9 rectangles … How is this possible?

ChessboardRectangles

It simply relies on the fact that the crossover of two filled geometry sections in a Visio shapes actually result in a non-filled area! The above shape has one square to provide the outer border, and then four rectangles horizontally, and four rectangles vertically.

The following image, create using Scroll to Capture #Visio ShapeSheets with #SnagIt, of the ShapeSheet shows how simple this is to create in Visio. Each of the Geometry sections below describe a rectangle using formulas. A rectangle needs to have a starting vertex, then three other vertices in order, and finally returns to the original starting vertex. Geometry 1 is the enclosing rectangle; Geometry sections 2,3,4, &5 are column 2, 4, 6 & 8; and Geometry sections 6,7,8 & 9 are rows 1,3,5 & 7.

ChessboardShapeSheet

I have used the default RelMoveTo and RelLineTo row types, because they expect a simple number to defined the relative position of the vertex in the X or Y direction with respect to the Width or the Height. Thus X=0.125 is equal to the Width / 8, and Y=0.5 is equal to the Height / 2.

Although I prefer to add sections and rows directly in the ShapeSheet, you can see the same effect by overlapping two filled rectangle shapes in Visio, and then using the Developer / Shape Design / Operations / Combine function. Notice how the resultant shape only has one colour fill, which is the fill of the first selected shape. This is because a traditional Visio shape can only have a single foreground colour. At first sight, you may think that there are five rectangles in the resultant shape, but the ShapeSheet shows that there are in fact only two!

This slideshow requires JavaScript.

Next I will be adding checkers or chess pieces onto the board….

Update: My good friend Chris Roth, aka VisGuy.com, has pointed out that a checkerboard can be created by a single snaking line! Excellent!

 

 

 

One Response to “What is the minimum number of rectangles in a #Visio chessboard?”

  1. Cyber Monday free #Visio Checkers! | bVisual - for people interested in Microsoft Visio Says:

    […] added connection points to the dark squares of my chess/checker board created previously ( What’s the minimum number of rectangles in a Visio chessboard?). These were created with a connection point type of 2 ( Inward/Outward), so that the checkers […]


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Chris Webb's BI Blog

Microsoft Analysis Services, MDX, DAX, Power Pivot, Power Query and Power BI

davecra.wordpress.com/

Microsoft Office 365 Development, and more...

PowerShell.Amsterdam

Automate, Accelerate, Accurate

johnvisiomvp

Life with Visio and other Microsoft Toys!

Title (Required)

Windows Server Essentials Tips & Tricks

Nilsandrey's Weblog

Just another WordPress.com weblog

Things that Should be Easy

Every so often (too often in the IT industry) I encounter things that should have been very easy to do but turned out to be far too complicated. My favorite topics include SharePoint, .Net development, and software architecture, especially distributed systems.

Visio Guy

Shapes, Stencils, Drawings Templates, Tutorials, Tips & Developer Info for Microsoft Visio

Hannes's Virtual Earth

Tips & Tricks around Mapping and Cloud Computing

Pluralsight blog

be smart, be clear, be visual ...

%d bloggers like this: