Altan – Blackwaterside, and more from Anne Briggs

Another version of Blackwaterside from Irish Group Altan followed by two Anne Briggs songs accompanied by very nice home made videos.

Official video for the song, Blackwaterside, from the album ‘Blackwater’ (1996)

Photos taken around Shanklin on the Isle of Wight Music by Anne Briggs

The Snow it Melts the Soonest by Anne Briggs

 

And I’ve just found this version by Sting:

Posted in Bach | Tagged , , | Leave a comment

Geometry for Joiners

A question came up on the ABC Self-Service-Science Forum, asking for a solution to find the dimensions of a diagonal brace looking like the diagram below:

The solution is not as simple as it might look because the angle of the brace is not equal to the angle of the diagonal. The solution I came up with is shown below:

The length of the diagonal of the brace is equal to the diagonal of the opening it fits in. The side length of the brace, before cutting is then found by pythagoras:

(Diagonal^2 – Brace Width^2)^0.5

The end of the brace is then at the intersection of a circle centred at the bottom left corner, with radius equal to the brace length, and a circle centred at the top right corner, with radius equal to the brace width (green lines in the diagram).  I already had a User-Defined Function (UDF) to find the intersection point  of two circles, so it was a simple matter to copy the code into a new spreadsheet, and set up the required input and length calculations.

Having found the coordinates of this point the position of the skew cuts can be found by simple proportion.

The spreadsheet (including open source code) can be downloaded from FrameBrace.xlsb, and the UDF to find the circles intersection point (along with many other geometrical and interpolation functions) can be downloaded from IP2.Zip

Posted in Coordinate Geometry, Excel, Newton, UDFs, VBA | Tagged , , , , , , | 1 Comment

Another Post About Everything

We had a post about everything from xkcd before, but this one is a bit more sophisticated.  You can zoom in from this:

The Universe

down to this:

A tiny little bit of the Universe

and everything in between, at HTwins.net (if you get an ad for a game, click on the skip-ad button).

Posted in Newton | Tagged , | Leave a comment

All men will be sailors then, until the sea shall free them

The YouTube video of A Sailor’s Life by the Fairport Convention contains the image shown below:

I have just discovered that the words are taken from the Leornard Cohen song Suzanne, but of the origin of the image I have no idea. If anyone recognises it, please leave a comment.

Here’s the original, from 1970 or threabouts:

And a live version from 2008:

Suzanne takes you down to her place near the river
You can hear the boats go by
You can spend the night beside her
And you know that she’s half crazy
But that’s why you want to be there
And she feeds you tea and oranges
That come all the way from China
And just when you mean to tell her
That you have no love to give her
Then she gets you on her wavelength
And she lets the river answer
That you’ve always been her lover
And you want to travel with her
And you want to travel blind
And you know that she will trust you
For you’ve touched her perfect body with your mind.
And Jesus was a sailor
When he walked upon the water
And he spent a long time watching
From his lonely wooden tower
And when he knew for certain
Only drowning men could see him
He said “All men will be sailors then
Until the sea shall free them”
But he himself was broken
Long before the sky would open
Forsaken, almost human
He sank beneath your wisdom like a stone
And you want to travel with him
And you want to travel blind
And you think maybe you’ll trust him
For he’s touched your perfect body with his mind.

Now Suzanne takes your hand
And she leads you to the river
She is wearing rags and feathers
From Salvation Army counters
And the sun pours down like honey
On our lady of the harbour
And she shows you where to look
Among the garbage and the flowers
There are heroes in the seaweed
There are children in the morning
They are leaning out for love
And they will lean that way forever
While Suzanne holds the mirror
And you want to travel with her
And you want to travel blind
And you know that you can trust her
For she’s touched your perfect body with her mind.

 

Update 23 April 2012: I have just found a new version of this song recently uploaded on Youtube by Coffeescup:

 

Update 27 March 2012: Debra Dalgleish (from the Contextures Blog) sent me an e-mail identifying the source of the image. It comes from Jason Kinney and can be seen here: http://www.coolhunting.com/style/pauper-voile-sc.php

After realizing scarves by covetable designers such as Alexander McQueen or Hermes were out of reach, Portland-based photographer Jason Kinney decided to apply his medium to silk. Pauper Voile is the upshot, with Kinney explaining that his interest in scarves made him “curious about how to put an image on fabric.” Starting out with wood-block prints before teaching himself how to screen print, he refined his skill to an obsessive degree for a line of scarves that exude Gothic sophistication.

… “The Sail” design is composed of elements from Victorian paintings and an old photograph of a sailor in profile.

Posted in Bach | Tagged , , , , , | 1 Comment

Writing Arrays to the worksheet – VBA function

Previous posts have looked at the VBA code for efficiently writing a VBA array to the spreadsheet as quickly as possible, most recently here.

I have now put this code in a function that can be conveniently called from any other VBA routine, with several optional features:

  • Optional “NumRows” and “NumCols” parameters, allowing part of the array to be written to the spreadsheet (default is write the whole array)
  • Optional “ClearRange” parameter, allowing the data in the named range to be cleared before writing the new data.  This may be useful if the range to be written is smaller than the old range, and you wish to keep the old data outside the limits of the new array.  Default is True, i.e. the old data will be cleared.
  • Optional Rowoff and Coloff parameters, allowing the data to be offset from the top-left corner of the specified range.  Default offset values are zero.

Another new feature is that the array to be written may be a worksheet range, providing a quick and convenient way of copying the data in any range as values to another location.

The code is shown below:

Function CopyToRange(VBAArray As Variant, RangeName As String, Optional NumRows As Long = 0, _
                    Optional NumCols As Long = 0, Optional ClearRange As Boolean = True, _
                    Optional RowOff As Long = 0, Optional ColOff As Long = 0) As Long
Dim DataRange As Range

    On Error GoTo RtnError
    If TypeName(VBAArray) = "Range" Then VBAArray = VBAArray.Value2
    If NumRows = 0 Then NumRows = UBound(VBAArray)
    If NumCols = 0 Then NumCols = UBound(VBAArray, 2)
    Set DataRange = Range(RangeName)
    If ClearRange = True Then DataRange.Offset(RowOff, ColOff).ClearContents
    DataRange.Resize(NumRows, NumCols).Name = RangeName
    Range(RangeName).Offset(RowOff, ColOff).Value = VBAArray
    Set DataRange = Nothing
    CopyToRange = 0
    Exit Function

RtnError:
    CopyToRange = 1
End Function

It may also be downloaded from CopyToRange.zip, which includes the code plus a short sample code that generates a 4×4 array, writes it to the spreadsheet, then copies that range to another named range on the spreadsheet, producing the output below:

CopyToRange Function

Note that this function must be called from a VBA subroutine, since functions called from the spreadsheet, as a User Defined Function, cannot write to other parts of the spreadsheet.

Finally, another short but useful function is included in the download file, which clears a named range. After clearing the named range is re-sized to 1 row, or optionally to any specified number of rows:

Function ClearRange(RangeName As String, Optional NumRows As Long = 0, _
        Optional RowOff As Long = 0, Optional ColOff As Long = 0) As Long
Dim DataRange As Range, NumCols As Long

    On Error GoTo RtnError

    Set DataRange = Range(RangeName)
    If NumRows = 0 Then NumRows = 1
    NumCols = DataRange.Columns.Count

    DataRange.Offset(RowOff, ColOff).ClearContents
    DataRange.Resize(NumRows, NumCols).Name = RangeName
    Set DataRange = Nothing
    ClearRange = 0
    Exit Function

RtnError:
    ClearRange = 1
End Function
Posted in Arrays, Excel, VBA | Tagged , , , , | 17 Comments