Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Beginning Microsoft Visual C# 2008 ISBN: 978-0-470-19135-4
This is the forum to discuss the Wrox book Beginning Microsoft Visual C# 2008 by Karli Watson, Christian Nagel, Jacob Hammer Pedersen, Jon D. Reid, Morgan Skinner, Eric White; ISBN: 9780470191354
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Microsoft Visual C# 2008 ISBN: 978-0-470-19135-4 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old September 9th, 2009, 04:33 PM
Friend of Wrox
 
Join Date: Feb 2009
Posts: 194
Thanks: 5
Thanked 3 Times in 3 Posts
Default Chapter 4 Exercise 4

I thought I was understanding this book pretty well (have been going through the exercises over the past few days without too much trouble) however I have come to this exericse and I am a bit stumped so I looked at the answer.

And i'm confused as I do not think I would have got that answer and I am not sure where this part:

realStep = (realMax - realMin) / 79;
imagStep = (imagMax - imagMin) / 48;

is figured out from?

Could anybody give me a page reference or a link explaining this in more depth to me?
  #2 (permalink)  
Old September 18th, 2009, 10:46 AM
Registered User
 
Join Date: Sep 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hey Will :)
Nice to see i'm not the only one struggling with this exercise.

I enjoy this book very much so far. I'm pretty noob when it comes to programming c#, but i want to learn from basic to more advanced.

I have to say that this 'try it out', using for loops, on page 85 in the book almost took my breath away.
Its just a bit confusing to understand whats going on there.

My question is if its ok to skip this Mandelbrot example for now, and carry on with the rest of the book?

I understand basics of the for loop, but this was just so confusing.
  #3 (permalink)  
Old September 18th, 2009, 11:08 AM
Friend of Wrox
 
Join Date: Feb 2009
Posts: 194
Thanks: 5
Thanked 3 Times in 3 Posts
Default

I figured the answer out but didn't post here as this section of the forum seemed pretty dead.

The part of the solution I was having trouble figuring out comes from:

Code:
for (imagCoord = 1.2; imagCoord >= -1.2; imagCoord -= 0.05)
            {
                for (realCoord = -0.6; realCoord <= 1.77; realCoord += 0.03)
you divide by 79 and 48 as this gives you 0.05 and 0.03.

In the end I coded out the answer and worked through it but I never would of come up with that myself. I just moved on to chapter 5 and refer back to chapter 4 when I need to.

It would be helpful if the answers came with explanations to make things easier to grasp firstime around as although I can understand what it does and how it achieves it, there is no explanation as to why that method was chosen as my solution was completley different and ended up doing the same thing. Most likely not as well but it still worked.


Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 5 Exercise 2 diango BOOK: Beginning Visual Basic 2005 Databases ISBN: 978-0-7645-8894-5 4 February 1st, 2011 03:24 PM
chapter 3 exercise 4 walkamongus BOOK: Beginning JavaScript 3rd Ed. ISBN: 978-0-470-05151-1 0 September 10th, 2007 09:34 PM
Chapter 5 - Exercise 1 scgtman BOOK: Beginning Visual Basic 2005 Databases ISBN: 978-0-7645-8894-5 3 May 16th, 2006 08:10 PM
chapter 9 exercise michaelcode BOOK: Beginning ASP.NET 1.0 1 April 9th, 2006 03:56 PM
Chapter 8, Exercise 4 cjo BOOK: Beginning ASP.NET 1.0 0 November 3rd, 2003 02:26 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.