Home | | Computer Aided Design | Warnock algorithm

# Warnock algorithm

The Warnock algorithm is a hidden surface algorithm developed by John Warnock that is classically used in the area of graphics.

Warnock algorithm

The Warnock algorithm is a hidden surface algorithm developed by John Warnock that is classically used in the area of graphics. It explains the issues of rendering a difficult image by recursive subdivision of a view until regions are attained that is trivial to evaluate. Similarly, if the view is simple to compute effectively then it is rendered; else it is split into tiny parts which are likewise evaluated for simplicity. This is a algorithm with run-time of O(np), where p is the number of pixels in the viewport and n is the number of polygons.

The inputs for Warnock algorithm are detail of polygons and a viewport. The good case is that if the detail of polygons is very simple then creates the polygons in the viewport. The continuous step is to divide the viewport into four equally sized quadrants and to recursively identify the algorithm for each quadrant, with a polygon list changed such that it contains polygons that are detectable in that quadrant. Fig.3.5. Warnock algorithm

1.  Initialize the region.

2.  Generate list of polygons by sorting them with their z values.

3.  Remove polygons which are outside the area.

4.  Identify relationship of each polygon.

5.  Execute visibility decision analysis:

a)Fill area with background color if all polygons are disjoint,

b)Fill entire area with background color and fill part of polygon contained in area with color of polygon if there is only one contained polygon,

c) If there is a single surrounding polygon but not contained then fill area with color of surrounding polygon.

d)Set pixel to the color of polygon which is closer to view if region of the pixel (x,y) and if neither of (a) to (d) applies calculate z- coordinate at pixel (x,y) of polygons.

6.  If none of above is correct then subdivide the area and Go to Step 2.

Study Material, Lecturing Notes, Assignment, Reference, Wiki description explanation, brief detail
Mechanical : Computer Aided Design : Visual Realism : Warnock algorithm |
{"ft_lang_label":"__label__en","ft_lang_prob":0.90174586,"math_prob":0.97764206,"size":1984,"snap":"2022-40-2023-06","text_gpt3_token_len":418,"char_repetition_ratio":0.14545454,"word_repetition_ratio":0.0,"special_character_ratio":0.2046371,"punctuation_ratio":0.10209424,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.97151595,"pos_list":[0,1,2],"im_url_duplicate_count":[null,2,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-09-30T03:08:36Z\",\"WARC-Record-ID\":\"<urn:uuid:65cdebb0-25b8-43a3-ae62-ae7b35ee6df8>\",\"Content-Length\":\"35472\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:68c5333e-efac-4e70-935e-a9fa2a56eedb>\",\"WARC-Concurrent-To\":\"<urn:uuid:01ce6152-d44e-471e-8be4-1246d41630c8>\",\"WARC-IP-Address\":\"68.178.145.35\",\"WARC-Target-URI\":\"https://www.brainkart.com/article/Warnock-algorithm_5717/\",\"WARC-Payload-Digest\":\"sha1:4FGI7H4YK2FOZMHQFHBMNJJOWYHT3HQN\",\"WARC-Block-Digest\":\"sha1:KXJSKGSLMCQUKZ2BME37QIMYZYZKCWNQ\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-40/CC-MAIN-2022-40_segments_1664030335424.32_warc_CC-MAIN-20220930020521-20220930050521-00653.warc.gz\"}"}