Tuesday, March 17, 2020

Berninis David in Comparison to Michelangelos David essays

Berninis David in Comparison to Michelangelos David essays Bernini and Michelangelo were two artists that sculpted versions of David. Several differences spring to mind when comparing Berninis sculpture of David with Michelangelos. Those would be the period in which they were sculpted, the size of the statues and especially the moment in time that was chosen. In the next few paragraphs I am prepared to elaborate on these differences. The most obvious difference I believe would be the moment in time that both artists chose to represent in carving their Davids. Berninis David seems to be right in the middle of the battle. He is in the process of using his sling in order to defeat the horrible Goliath. The muscles in his legs are very tight as he is stepping forward. His arms and chest seem to be tensed as if he is in the process of gathering momentum in order to issue a powerful blow with the rock that is about to be hurled from his sling. Also the activity of slinging the stone seems to be pulling Davids robe from his body but Bernini chose to capture this action before he is actually exposing any nudity. This statue was carved during the Baroque Era and is typical of this era because it depicts the subject in motion. This busy work of art certainly represents action in every way. At the time this statue was carved it also gave a new way of looking at space. It seems as if David has actually left his own des ignated area and has sort of spilled over into a space not his own. And lets not forget about how this particular David gives you a concept of specific time which is something else introduced by artists in the Baroque Era. There is no question in your mind that he is in the middle of a rigorous battle. Another interesting thing about Berninis sculpture is that he actually carved it to be life-sized. I think that this helps idealize the realism that was so important to this era in art. In contrast to Berninis David is Michelan ...

Sunday, March 1, 2020

Implementing QuickSort Sorting Algorithm in Delphi

Implementing QuickSort Sorting Algorithm in Delphi One of the common problems in programming is to sort an array of values in some order (ascending or descending). While there are many standard sorting algorithms, QuickSort is one of the fastest. Quicksort sorts by employing a divide and conquer strategy to divide a list into two sub-lists. QuickSort Algorithm The basic concept is to pick one of the elements in the array, called a pivot. Around the pivot, other elements will be rearranged. Everything less than the pivot is moved left of the pivot - into the left partition. Everything greater than the pivot goes into the right partition. At this point, each partition is recursive quick sorted. Heres QuickSort algorithm implemented in Delphi: procedure QuickSort(var A: array of Integer; iLo, iHi: Integer) ; var   Ã‚  Lo, Hi, Pivot, T: Integer; begin   Ã‚  Lo : iLo;   Ã‚  Hi : iHi;   Ã‚  Pivot : A[(Lo Hi) div 2];   Ã‚  repeat   Ã‚  Ã‚  Ã‚  while A[Lo] Pivot do Inc(Lo) ;   Ã‚  Ã‚  Ã‚  while A[Hi] Pivot do Dec(Hi) ;   Ã‚  Ã‚  Ã‚  if Lo Hi then   Ã‚  Ã‚  Ã‚  begin   Ã‚  Ã‚  Ã‚  Ã‚  Ã‚  T : A[Lo];   Ã‚  Ã‚  Ã‚  Ã‚  Ã‚  A[Lo] : A[Hi];   Ã‚  Ã‚  Ã‚  Ã‚  Ã‚  A[Hi] : T;   Ã‚  Ã‚  Ã‚  Ã‚  Ã‚  Inc(Lo) ;   Ã‚  Ã‚  Ã‚  Ã‚  Ã‚  Dec(Hi) ;   Ã‚  Ã‚  Ã‚  end;   Ã‚  until Lo Hi;   Ã‚  if Hi iLo then QuickSort(A, iLo, Hi) ;   Ã‚  if Lo iHi then QuickSort(A, Lo, iHi) ; end; Usage: var   Ã‚  intArray : array of integer; begin   Ã‚  SetLength(intArray,10) ;   Ã‚  //Add values to intArray   Ã‚  intArray[0] : 2007;   Ã‚  ...   Ã‚  intArray[9] : 1973;   Ã‚  //sort   Ã‚  QuickSort(intArray, Low(intArray), High(intArray)) ; Note: in practice, the QuickSort becomes very slow when the array passed to it is already close to being sorted. Theres a demo program that ships with Delphi, called thrddemo in the Threads folder which shows additional two sorting algorithms: Bubble sort and Selection Sort.