# British Museum Great Court

![](https://1430428134-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ld8QK19sjP1I9rhLouo%2F-MG_7ZEltTOuMbmy2qun%2F-MG_8-30jpEEl1R-Wqkp%2FBritishMuseumGreatCourtRoof-1_2020-09-07_01-37-17.png?alt=media\&token=696af8c9-8247-4399-82c0-c14bdfc2e57a)

{% file src="<https://1430428134-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ld8QK19sjP1I9rhLouo%2F-MG_8_jjVxGnpS5UXJOj%2F-MG_8gIHxmrBBBwFe32N%2FChrisDeakin2001.pdf?alt=media&token=483f239d-e60f-4aa2-b99a-eaaf92211148>" %}
THE ANALYTIC AND NUMERICAL DEFINITION OF THE GEOMETRY OF THE BRITISH MUSEUM GREAT COURT ROOF
{% endfile %}

{% file src="<https://1430428134-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ld8QK19sjP1I9rhLouo%2F-MG_7ZEltTOuMbmy2qun%2F-MG_86c_vnD2ZvvKUMKD%2FBritishMuseumGreatCourtRoof-1.zip?alt=media&token=3eba1aa3-bd07-4a42-b13e-fc6244732585>" %}
Dynamo 2.9
{% endfile %}

```d
def z (x:var[]..[], y:var[]..[])
{
a = 22.245;
b = 36.625;
c = 46.025;
d = 51.125;

//λ
lm = 0.5;

//μ
mu = 14.0;

hcen = 20.955;
hedg = 19.71;
r = Math.Sqrt(Math.Pow(x,2)+Math.Pow(y,2));

//θ
the = Math.Asin(y/r);

//η
eta = (1-(x/b)) * (1+(x/b)) * (1-(y/c)) * (1+(y/d))/
(1-((a*x)/(r*b))) * (1+((a*x)/(r*b))) * (1-((a*y)/(r*c))) * (1+((a*y)/(r*d)));

//Ψ
psi = (1-(x/b)) * (1+(x/b)) * (1-(y/c)) * (1+(y/d));

//α
alp = ((r/a)-1) * psi;

//β
bet = (1-(a/r))/
(((Math.Sqrt(Math.Pow(b-x,2) + Math.Pow(c-y,2))) / ((b-x)*(c-y))) +
((Math.Sqrt(Math.Pow(b-x,2) + Math.Pow(d+y,2))) / ((b-x) * (d+y))) +
((Math.Sqrt(Math.Pow(b+x,2) + Math.Pow(c-y,2))) / ((b+x) * (c-y))) +
((Math.Sqrt(Math.Pow(b+x,2) + Math.Pow(d+y,2))) / ((b+x)*(d+y))));

z1 = ((hcen - hedg)*eta) + hedg;
z2 = alp * (((1-lm)*(((35.0+(10.0*psi))*0.5*(1+Math.Cos(2*the)))+(12.0*(0.5*(1-Math.Cos(2*the))+Math.Sin(the)))+((7.5+(12.0*psi))*(0.5*(1-Math.Cos(2*the))-Math.Sin(the)))-1.6))
- ((5.0*(1+Math.Cos(2*the)))+(10.0*(Math.Pow((0.5*(0.5*(1-Math.Cos(2*the))+Math.Sin(the))),2))*(1.0-(3.0*alp))))
+ (2.5*(Math.Pow((0.5*(0.5*(1-Math.Cos(2*the)-Math.Sin(the)))),2))*(Math.Pow(((r/a)-1),2))));
z3 = bet * ((lm*((1.75*(1+Math.Cos(2*the)))+(1.5*(1-Math.Cos(2*the)))+(0.3*Math.Sin(the))))
+ (1.05*(Math.Pow(Math.E,-mu*(1-(x/b)))+Math.Pow(Math.E,-mu*(1+(x/b))))*(Math.Pow(Math.E,-mu*(1-(y/c)))+Math.Pow(Math.E,-mu*(1+(y/d))))));
return = z1 + z2 +z3;
};

x =-36.6..36.6..#30;
y = -51.125..46.025..#30;
p = NurbsSurface.ByPoints(Point.ByCoordinates(x<1>,y<2>).Translate(Vector.ByCoordinates(0,0,z(x<1>,y<2>)))).Trim(Plane.ByOriginNormal(Point.ByCoordinates(0,0,19.71),Vector.ZAxis()),Point.Origin());
```

![](https://1430428134-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ld8QK19sjP1I9rhLouo%2F-MG_7ZEltTOuMbmy2qun%2F-MG_8O5VnGCcMfNT3fHZ%2FBritishMuseumGreatCourtRoof-2_2020-09-07_01-37-57.png?alt=media\&token=a13e1897-4eff-44ab-a41d-7fa31345aedc)

{% file src="<https://1430428134-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ld8QK19sjP1I9rhLouo%2F-MG_7ZEltTOuMbmy2qun%2F-MG_8TEDFd4raCIv0s0V%2FBritishMuseumGreatCourtRoof-2.zip?alt=media&token=98778d6e-dada-4073-b4db-14e5748b144b>" %}
Dynamo 2.7
{% endfile %}

```d
cen1 = Circle.ByCenterPointRadius(Point.Origin(),15);
edg1 = Rectangle.ByWidthLength(73,97).Translate(Vector.YAxis(),3);
pnt1 = (edg1.Explode())<1>.PointAtParameter((0..1..#10)<2>);
pnt2 = cen1.ClosestPointTo(pnt1);
pnt3 = Line.ByStartPointEndPoint(pnt1,pnt2).PointAtParameter(0.5).Translate(Vector.ZAxis(),6);
pnt4 = List.Transpose(Arc.ByThreePoints(pnt1,pnt3,pnt2))<1>.PointAtParameter((0..1..#10)<2>);
pnt5 = Point.PruneDuplicates(List.Flatten(pnt4<1>,-1),0.001);
srf1 = Surface.ByLoft(List.AddItemToFront(edg1,List.RestOfItems(NurbsCurve.ByControlPoints(pnt5,3,true))));
```
