[CSC 315] CSC 315 HW 2 Question

Andrew J. Pounds pounds_aj at mercer.edu
Fri Oct 2 09:45:20 EDT 2020


You are way overthinking this.  Think back to the circle symmetry.  Now
think about the sin curve on the boundary [0,2Pi]. 

How much of the curve do you actually have to compute? [0,Pi/4]? 
[0,Pi/2]? [0,Pi]?  You certainly shouldn't need any more than [0,Pi]
becuase the rest you could compute based on the negation of the results
along the previous boundary.  The question here is really asking you ow
much could you compute based on symmetry?

Yes -- just put together some pseudocode indicating how much you
actually have to compute with the sin function (you do not have to use
the midpoint circle algorithm in this case)  and then how you would
determine the other points based on symmetry.

For problem 6-13 by parallel they mean calculating once and them
propagating the solution by symmetry into the array,

In other words, calculate the value for x and y using midpoint circle
algorithm and then place the other points, by symmetry.  This is termed
a parallel implementation because you could be talking to 16 locations
in memory simultaneously while stepping through the loop to calculate
the points along the arc.

The trick here is not overwriting the memory elements you previously
addressed!


On 10/2/20 8:13 AM,  wrote:
> Follow up,
>
> For problem 6-16, do we need to devise the algorithm for the basic
> sine function (y=sin(x)), or the general sine curve (y = a(sin(b(x-c))+d?
> I ask because the basic sine function barely enters the next highest y
> pixel. Thanks,
>
>  
> Dr. Pounds,
>
> For problem 6-13, do you want us to draft up the algorithm that would
> equitably divide the arc of the circle, and assume that those segments
> would just be passed to the midpoint circle algorithm preexisting? Thanks,
>
>

-- 
Andrew J. Pounds, Ph.D.  (pounds_aj at mercer.edu)
Professor of Chemistry and Computer Science
Director of the Computational Science Program
Mercer University,  Macon, GA 31207   (478) 301-5627

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://theochem.mercer.edu/pipermail/csc315/attachments/20201002/f9b887d6/attachment.html>


More information about the csc315 mailing list