8.3prisms Pyramids Sa & Vmr.'s Learning Website



From Simple English Wikipedia, the free encyclopedia

A pyramid is a structure, usually of stone, built in the shape of a pyramid. From ancient to modern times people in many different parts of the world have built such structures.

The word 'pyramid' comes from the Greek word pyramis which meant 'wheat cake.' The ancient Egyptian word for them was something like 'Mer'.[1] The Great Pyramid of Giza was one of the Seven Wonders of the ancient world.

Edwin Moise Elementary Geometry From an Advanced Standpoint 3rd Edition 1990 - Free ebook download as PDF File (.pdf), Text File (.txt) or read book online for free.

  1. Surface Area of Prisms and Pyramids Interactive Notebook Pages, Nets and Guided Notes, CCS:6.G.4 Included in this product: Three Dimensional Figures Guided Notes (1 and 2 per page) Venn Diagram Foldable (Compare and Contrast Volume and Surface Area) Nets Exit Slip (2 per page) 8 Shutter Prisms.
  2. Demonstration of the relationship of between the volumes of prisms and pyramids using colored liquid and 3D shapes (square pyramid and prism, triangular pyra.

The first pyramids were built in 2630 B.C. The oldest known pyramid was made for king Djoser of the third Dynasty.

Egyptian pyramids[change | change source]

In Egypt, kings and queens, called Pharaohs, were buried in huge square-bottomed pyramids built of stone. They were usually built to be used as tombs for Pharaohs. The ancient Egyptian pyramids are very well built. Some of the pyramids still stand today.[2]

The oldest man-made pyramid found is called the Step pyramid. It is in the Giza Necropolis in Saqqara, near Cairo, Egypt. It was built for King Djoser thousands of years ago. Later pyramids were built much larger. The largest one was the Great Pyramid of Giza. It is near Cairo. It was the tallest building in the world until the Eiffel Tower was built in Paris, in 1889. The Great Pyramid was built by the pharaoh Khufu (= Cheops) from the Ancient Egyptian Old Kingdom. Herodotus was told by his Egyptian guides that it took twenty years for a force of 100,000 slaves to build the pyramid (with another ten years to build a stone causeway that connected to a temple in the valley below).

People once thought pyramids were built by slaves. More recent evidence suggests that the workers who built the pyramids were paid and well-cared for. They were loyal to the Pharaoh. Inside the Great Pyramid, famous man-made objects have been found from ancient times. Many valuable items were buried with the dead Pharaohs, in the hope that they would take them to the afterlife. Pyramids usually had traps to stop thieves from escaping easily. Tomb thieves were punished by death if they were caught. However, by 1000 BC, many of the pyramids had been robbed of their precious treasures.

A large statue of a Sphinx stands near the pyramids at Giza. It has the body of a Lion and the head of a Pharaoh.

The ancient Greeks called the Great Pyramid one of the seven wonders of the world. There are over 100 pyramids in Egypt. Most of them are on the western side of the River Nile. Some Egyptologists have different opinions on why the ancient Egyptian Kings built pyramids as their tombs. Pyramids have been excavated for about the last 200 years.

The ancient Egyptians believed that the Egyptian pharaohs went to the stars to join their gods in the afterlife.

Pyramids in the Americas[change | change source]

The Aztecs and Mayans also built many massive pyramids. None are as old or big as the oldest or biggest Egyptian pyramids. Most of them are step pyramids.

Unlike Egyptian pyramids, which were used as tombs for rulers and wealthy people, Aztec and Mayan pyramids are believed to have been used for public displays of human sacrifice.

Modern pyramids[change | change source]

Luxor Hotel in Las Vegas, Nevada
Pyramid Arena in Memphis, Tennessee
Walter Pyramid in Long Beach, California
Oscar Niemeyer's design for a museum in Caracas
Transamerica Pyramid in San Francisco, California
  • The Louvre Pyramid in Paris, France, in the court of the Louvre Museum. It is a 20.6 meter (about 70 foot) glass structure which acts as an entrance to the museum. It was designed by the American architect I. M. Pei and completed in 1989.
  • The Luxor Hotel in Las Vegas, United States, is a 30-story true pyramid. It has light beaming from the top.
  • The 32-story Pyramid Arena in Memphis, Tennessee (a city named after the ancient Egyptian capital whose name itself was derived from the name of one of its pyramids). Built in 1991, it was the home court for the University of Memphis men's basketball program and the National Basketball Association's Memphis Grizzlies until 2004.
  • The Walter Pyramid is home to the basketball and volleyball teams of the California State University, Long Beach, campus in California, United States. It is an 18-story-tall blue true pyramid.
  • The 48-story Transamerica Pyramid is in San Francisco, California It was designed by William Pereira. The pyramid is one of the city's symbols.
  • The 105-story Ryugyong Hotel is in Pyongyang, Northern Korea.
  • 'Pyramid of Tirana' is a former museum and monument in Tirana, Albania.
  • The Slovak Radio Building is in Bratislava, Slovakia. This building is shaped like an inverted pyramid.
  • The Summum Pyramid is a three story pyramid in Salt Lake City, Utah. It used for instruction in the Summum philosophy. it also conducts rites associated with Modern Mummification.
  • The Palace of Peace and Reconciliation is in Nur-Sultan, Kazakhstan.
  • The Pyramids at Osho Commune are in Pune, India. They are used for meditation purposes.
  • The three pyramids of Moody Gardens in Galveston, Texas.
  • The Co-Op Bank Pyramid or Stockport Pyramid is in Stockport, England. is a large pyramid shaped office building in Stockport in England.
  • The Ames Monument is in southeastern Wyoming. It honors the brothers who financed the Union Pacific Railroad.
  • The Trylonis a triangular pyramid erected for the 1939 World's Fair in Flushing, Queens. It was demolished after the Fair closed.
  • The Ballandean Pyramid is in Ballandean in rural Queensland, Australia. It is a 15-meter folly pyramid made from blocks of local granite.
  • The Karlsruhe Pyramid is in the centre of the market square of Karlsruhe, Germany. It is made of red sandstone. It is in the centre of the market square of Karlsruhe, Germany. It was erected in the years 1823–1825.
  • The GoJa Music Hall is in Prague.
  • The Muttart Conservatory greenhouses are in Edmonton, Alberta.
  • Small pyramids similar to those of the Louvre can be found outside the lobby of the Citicorp Building in Long Island City, Queens NY.
  • The Pyramids of the City Stars Complex is in Cairo, Egypt.
  • Pyramid building belonging to The Digital Group (TDG), at Hinjwadi, Pune, India.[3]
  • The Steelcase Corporate Development Center near Grand Rapids, Michigan.
  • Sunway Pyramid shopping mall in Selangor, Malaysia.
  • Hanoi Museum with an overall design of a reversed Pyramid.
  • The Pyramide des Ha! Ha! by artist Jean-Jules Soucyfr:Jean-Jules Soucy in La Baie, Quebec is made out of 3 000 give way signs.[4]
  • The 'Pyramid' culture-entertainment complex and Monument of Kazan siege (Church of Image of Edessa) are in Kazan, Russia.
  • The 'Phorum' of Expocentre business-exhibition complex is in Moscow, Russia.
  • Few pyramids of the Marco-city shopping-entertainment complex are in Vitebsk, Belarus.[5]
  • The Time pyramid is in Wemding, Germany. The pyramid begun in 1993. It is scheduled for completion in the year 3183.[6]
  • Triangle is a proposed skyscraper in Paris.
  • The Shimizu Mega-City Pyramid, a proposed project for construction of a massive pyramid over Tokyo Bay in Japan.
  • The tomb of Quintino Sella, outside the monumental cemetery of Oropa.[7]
  • The unbuilt Museum of Modern Art of Caracas was designed as an upside down pyramid. Playing on a variation of the famous configuration Oscar Niemeyer inverted the geometry of the pyramid.[8]

Other pyramids[change | change source]

There are also ancient pyramids in other parts of Africa, Central America, Europe, North America, and Asia. There is a famous modern glass pyramid in front of the LouvreMuseum in Paris. The Luxor Hotel, in Las Vegas, Nevada is also a glass pyramid.

Related pages[change | change source]

References[change | change source]

  1. Janet, Wood. 'ANCIENT NILE'S ANCIENT EGYPT: PYRAMIDS History of the Egyptian Pyramids'. 1995. Ancientnile.co.uk. Retrieved 11 November 2014.
  2. 'Ancient Egyptian History for Kids: Pyramids'. www.ducksters.com.
  3. http://www.thedigitalgroup.com
  4. 'La pyramide de la baies des HaHa:'.
  5. В Витебске открыли пирамиду «Марко-сити»Archived 2014-05-17 at the Wayback Machine accessed: 13 November 2014
    В Витебске прошло открытие торгово-развлекательного комплекса «Марко-сити»
  6. Conception Official Zeitpyramide website, accessed: 13 November 2014
  7. Luisa Bocchietto, Mario Coda and Carlo Gavazzi. 'THE OTHER OROPA: A Guide to the Monumental Cemetery of the Sanctuary'(PDF). Archived from the original(pdf) on 2014-05-17. Retrieved 2014-11-12.
  8. http://www.vitruvius.com.br/revistas/read/arquitextos/13.151/4465 |accessed: 13 November 2014

8.3prisms Pyramids Sa & Vmr.'s Learning Websites

Other websites[change | change source]

Wikimedia Commons has media related to Pyramid.
Retrieved from 'https://simple.wikipedia.org/w/index.php?title=Pyramid&oldid=7235041'

A resource is an object that represents a 'place' in a tree related toyour application. Every Pyramid application has at least one resourceobject: the root resource. Even if you don't define a root resourcemanually, a default one is created for you. The root resource is the root of aresource tree. A resource tree is a set of nested dictionary-likeobjects which you can use to represent your website's structure.

In an application which uses traversal to map URLs to code, theresource tree structure is used heavily to map each URL to a viewcallable. When traversal is used, Pyramid will walk throughthe resource tree by traversing through its nested dictionary structure inorder to find a context resource. Once a context resource is found,the context resource and data in the request will be used to find a viewcallable.

In an application which uses URL dispatch, the resource tree is onlyused indirectly, and is often 'invisible' to the developer. In URL dispatchapplications, the resource 'tree' is often composed of only the root resourceby itself. This root resource sometimes has security declarations attached toit, but is not required to have any. In general, the resource tree is muchless important in applications that use URL dispatch than applications that usetraversal.

In 'Zope-like' Pyramid applications, resource objects also often storedata persistently, and offer methods related to mutating that persistent data.In these kinds of applications, resources not only represent the site structureof your website, but they become the domain model of the application.

Also:

  • The context and containment predicate arguments toadd_view() (or aview_config() decorator) reference a resource class orresource interface.

  • A root factory returns a resource.

  • A resource is exposed to view code as the context of a view.

  • Various helpful Pyramid API methods expect a resource as an argument(e.g., resource_url() and others).

Defining a Resource Tree¶

8.3prisms pyramids sa & vmr.

When traversal is used (as opposed to a purely URL dispatchbased application), Pyramid expects to be able to traverse a treecomposed of resources (the resource tree). Traversal begins at a rootresource, and descends into the tree recursively, trying each resource's__getitem__ method to resolve a path segment to another resource object.Pyramid imposes the following policy on resource instances in the tree:

  • A container resource (a resource which contains other resources) must supplya __getitem__ method which is willing to resolve a Unicode name to asub-resource. If a sub-resource by a particular name does not exist in acontainer resource, the __getitem__ method of the container resource mustraise a KeyError. If a sub-resource by that name does exist, thecontainer's __getitem__ should return the sub-resource.

  • Leaf resources, which do not contain other resources, must not implement a__getitem__, or if they do, their __getitem__ method must alwaysraise a KeyError.

See Traversal for more information about how traversal worksagainst resource instances.

Here's a sample resource tree, represented by a variable named root:

The resource tree we've created above is represented by a dictionary-like rootobject which has a single child named 'a'. 'a' has a single childnamed 'b', and 'b' has a single child named 'c', which has nochildren. It is therefore possible to access the 'c' leaf resource like so:

If you returned the above root object from a root factory, the path/a/b/c would find the 'c' object in the resource tree as the result oftraversal.

In this example, each of the resources in the tree is of the same class. Thisis not a requirement. Resource elements in the tree can be of any type. Weused a single class to represent all resources in the tree for the sake ofsimplicity, but in a 'real' app, the resources in the tree can be arbitrary.

Although the example tree above can service a traversal, the resource instancesin the above example are not aware of location, so their utility in a'real' application is limited. To make best use of built-in Pyramid APIfacilities, your resources should be 'location-aware'. The next section detailshow to make resources location-aware.

Location-Aware Resources¶

In order for certain Pyramid location, security, URL-generation, andtraversal APIs to work properly against the resources in a resource tree, allresources in the tree must be location-aware. This means they musthave two attributes: __parent__ and __name__.

The __parent__ attribute of a location-aware resource should be a referenceto the resource's parent resource instance in the tree. The __name__attribute should be the name with which a resource's parent refers to theresource via __getitem__.

The __parent__ of the root resource should be None and its __name__should be the empty string. For instance:

A resource returned from the root resource's __getitem__ method should havea __parent__ attribute that is a reference to the root resource, and its__name__ attribute should match the name by which it is reachable via theroot resource's __getitem__. A container resource within the root resourceshould have a __getitem__ that returns resources with a __parent__attribute that points at the container, and these sub-objects should have a__name__ attribute that matches the name by which they are retrieved fromthe container via __getitem__. This pattern continues recursively 'up' thetree from the root.

The __parent__ attributes of each resource form a linked list that points'downwards' toward the root. This is analogous to the .. entry infilesystem directories. If you follow the __parent__ values from anyresource in the resource tree, you will eventually come to the root resource,just like if you keep executing the cd.. filesystem command, eventuallyyou will reach the filesystem root directory.

Warning

If your root resource has a __name__ argument that is not None orthe empty string, URLs returned by theresource_url() function, and paths generatedby the resource_path() andresource_path_tuple() APIs, will be generatedimproperly. The value of __name__ will be prepended to every path andURL generated (as opposed to a single leading slash or empty tuple element).

Applications which use tree-walking Pyramid APIs require location-awareresources. These APIs include (but are not limited to)resource_url(),find_resource(), find_root(),find_interface(),resource_path(),resource_path_tuple(),traverse(), virtual_root(),and (usually) has_permission() andprincipals_allowed_by_permission().

In general, since so much Pyramid infrastructure depends onlocation-aware resources, it's a good idea to make each resource in your treelocation-aware.

Generating the URL of a Resource¶

If your resources are location-aware, you can use thepyramid.request.Request.resource_url() API to generate a URL for theresource. This URL will use the resource's position in the parent tree tocreate a resource path, and it will prefix the path with the currentapplication URL to form a fully-qualified URL with the scheme, host, port, andpath. You can also pass extra arguments toresource_url() to influence the generated URL.

The simplest call to resource_url() looks likethis:

The request in the above example is an instance of a Pyramidrequest object.

If the resource referred to as resource in the above example was the rootresource, and the host that was used to contact the server was example.com,the URL generated would be http://example.com/. However, if the resourcewas a child of the root resource named a, the generated URL would behttp://example.com/a/.

A slash is appended to all resource URLs whenresource_url() is used to generate them in thissimple manner, because resources are 'places' in the hierarchy, and URLs aremeant to be clicked on to be visited. Relative URLs that you include on HTMLpages rendered as the result of the default view of a resource are more apt tobe relative to these resources than relative to their parent.

You can also pass extra elements toresource_url():

If the resource referred to as resource in the above example was the rootresource, and the host that was used to contact the server was example.com,the URL generated would be http://example.com/foo/bar. Any number of extraelements can be passed to resource_url() asextra positional arguments. When extra elements are passed, they are appendedto the resource's URL. A slash is not appended to the final segment whenelements are passed.

You can also pass a query string:

If the resource referred to as resource in the above example was the rootresource, and the host that was used to contact the server was example.com,the URL generated would be http://example.com/?a=1.

When a virtual root is active, the URL generated byresource_url() for a resource may be 'shorter'than its physical tree path. See Virtual Root Support for moreinformation about virtually rooting a resource.

For more information about generating resource URLs, see the documentation forpyramid.request.Request.resource_url().

Overriding Resource URL Generation¶

If a resource object implements a __resource_url__ method, this method willbe called when resource_url() is called togenerate a URL for the resource, overriding the default URL returned for theresource by resource_url().

The __resource_url__ hook is passed two arguments: request andinfo. request is the request object passed toresource_url(). info is a dictionary withthe following keys:

physical_path

A string representing the 'physical path' computed for the resource, asdefined by pyramid.traversal.resource_path(resource). It will begin andend with a slash.

virtual_path

A string representing the 'virtual path' computed for the resource, asdefined by Virtual Root Support. This will be identical to thephysical path if virtual rooting is not enabled. It will begin and end witha slash.

app_url
Pyramids

A string representing the application URL generated duringrequest.resource_url. It will not end with a slash. It represents apotentially customized URL prefix, containing potentially custom scheme, hostand port information passed by the user to request.resource_url. Itshould be preferred over use of request.application_url.

The __resource_url__ method of a resource should return a stringrepresenting a URL. If it cannot override the default, it should returnNone. If it returns None, the default URL will be returned.

Here's an example __resource_url__ method.

The above example actually just generates and returns the default URL, whichwould have been what was generated by the default resource_url machinery,but your code can perform arbitrary logic as necessary. For example, your codemay wish to override the hostname or port number of the generated URL.

Note that the URL generated by __resource_url__ should be fully qualified,should end in a slash, and should not contain any query string or anchorelements (only path elements) to work withresource_url().

Generating the Path To a Resource¶

pyramid.traversal.resource_path() returns a string object representingthe absolute physical path of the resource object based on its position in theresource tree. Each segment of the path is separated with a slash character.

If resource in the example above was accessible in the tree asroot['a']['b'], the above example would generate the string /a/b.

Any positional arguments passed in to resource_path()will be appended as path segments to the end of the resource path.

If resource in the example above was accessible in the tree asroot['a']['b'], the above example would generate the string/a/b/foo/bar.

The resource passed in must be location-aware.

The presence or absence of a virtual root has no impact on the behaviorof resource_path().

Finding a Resource by Path¶

If you have a string path to a resource, you can grab the resource from thatplace in the application's resource tree usingpyramid.traversal.find_resource().

You can resolve an absolute path by passing a string prefixed with a / asthe path argument:

Or you can resolve a path relative to the resource that you pass in topyramid.traversal.find_resource() by passing a string that isn't prefixedby /:

Often the paths you pass to find_resource() aregenerated by the resource_path() API. These APIs are'mirrors' of each other.

If the path cannot be resolved when callingfind_resource() (if the respective resource in thetree does not exist), a KeyError will be raised.

See the pyramid.traversal.find_resource() documentation for moreinformation about resolving a path to a resource.

Obtaining the Lineage of a Resource¶

pyramid.location.lineage() returns a generator representing thelineage of the location-aware resource object.

The lineage() function returns the resource that ispassed into it, then each parent of the resource in order. For example, if theresource tree is composed like so:

8.3prisms Pyramids Sa & Vmr.'s Learning Website Learning

Calling lineage(thing2) will return a generator. When we turn it into alist, we will get:

The generator returned by lineage() first returnsunconditionally the resource that was passed into it. Then, if the resourcesupplied a __parent__ attribute, it returns the resource represented byresource.__parent__. If that resource has a __parent__ attribute, itwill return that resource's parent, and so on, until the resource beinginspected either has no __parent__ attribute or has a __parent__attribute of None.

See the documentation for pyramid.location.lineage() for moreinformation.

Determining if a Resource is in the Lineage of Another Resource¶

Use the pyramid.location.inside() function to determine if one resourceis in the lineage of another resource.

For example, if the resource tree is:

Calling inside(b,a) will return True, because b has a lineage thatincludes a. However, calling inside(a,b) will return Falsebecause a does not have a lineage that includes b.

The argument list for inside() is (resource1,resource2). resource1 is 'inside' resource2 if resource2 is alineage ancestor of resource1. It is a lineage ancestor if itsparent (or one of its parent's parents, etc.) is an ancestor.

See pyramid.location.inside() for more information.

Finding the Root Resource¶

Use the pyramid.traversal.find_root() API to find the rootresource. The root resource is the resource at the root of the resourcetree. The API accepts a single argument: resource. This is a resourcethat is location-aware. It can be any resource in the tree for whichyou want to find the root.

For example, if the resource tree is:

Calling find_root(b) will return a.

The root resource is also available as request.root within viewcallable code.

The presence or absence of a virtual root has no impact on the behaviorof find_root(). The root object returned is alwaysthe physical root object.

Resources Which Implement Interfaces¶

Resources can optionally be made to implement an interface. Aninterface is used to tag a resource object with a 'type' that later can bereferred to within view configuration and bypyramid.traversal.find_interface().

Specifying an interface instead of a class as the context orcontainment predicate arguments within view configurationstatements makes it possible to use a single view callable for more than oneclass of resource objects. If your application is simple enough that you seeno reason to want to do this, you can skip reading this section of the chapter.

For example, here's some code which describes a blog entry which also declaresthat the blog entry implements an interface.

This resource consists of two things: the class which defines the resourceconstructor as the class BlogEntry, and an interface attached tothe class via an implementer class decorator using the IBlogEntryinterface as its sole argument.

The interface object used must be an instance of a class that inherits fromzope.interface.Interface.

A resource class may implement zero or more interfaces. You specify that aresource implements an interface by using thezope.interface.implementer() function as a class decorator. The aboveBlogEntry resource implements the IBlogEntry interface.

You can also specify that a particular resource instance provides aninterface as opposed to its class. When you declare that a class implements aninterface, all instances of that class will also provide that interface.However, you can also just say that a single object provides the interface. Todo so, use the zope.interface.directlyProvides() function:

zope.interface.directlyProvides() will replace any existing interfacethat was previously provided by an instance. If a resource object already hasinstance-level interface declarations that you don't want to replace, use thezope.interface.alsoProvides() function:

zope.interface.alsoProvides() will augment the set of interfaces directlyprovided by an instance instead of overwriting them likezope.interface.directlyProvides() does.

For more information about how resource interfaces can be used by viewconfiguration, see Using Resource Interfaces in View Configuration.

Finding a Resource with a Class or Interface in Lineage¶

Use the find_interface() API to locate a parent thatis of a particular Python class, or which implements some interface.

8.3prisms Pyramids Sa & Vmr.'s Learning Website Free

For example, if your resource tree is composed as follows:

Calling find_interface(a,Thing1) will return the a resource becausea is of class Thing1 (the resource passed as the first argument isconsidered first, and is returned if the class or interface specificationmatches).

8.3prisms Pyramids Sa & Vmr.'s Learning Website Site

Calling find_interface(b,Thing1) will return the a resource becausea is of class Thing1 and a is the first resource in b's lineageof this class.

Calling find_interface(b,Thing2) will return the b resource.

The second argument to find_interface may also be a interfaceinstead of a class. If it is an interface, each resource in the lineage ischecked to see if the resource implements the specificed interface (instead ofseeing if the resource is of a class).

See also

See also Resources Which Implement Interfaces.

Pyramid API Functions That Act Against Resources¶

A resource object is used as the context provided to a view. SeeTraversal and URL Dispatch for more informationabout how a resource object becomes the context.

The APIs provided by pyramid.traversal are used against resource objects.These functions can be used to find the 'path' of a resource, the root resourcein a resource tree, or to generate a URL for a resource.

The APIs provided by pyramid.location are used against resources. Thesecan be used to walk down a resource tree, or conveniently locate one resource'inside' another.

Some APIs on the pyramid.request.Request accept a resource object as aparameter. For example, the has_permission() APIaccepts a resource object as one of its arguments; the ACL is obtained fromthis resource or one of its ancestors. Other security related APIs on thepyramid.request.Request class also accept context as anargument, and a context is always a resource.