Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 76983
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T20:45:32+00:00 2026-05-10T20:45:32+00:00

Learning a little about T-SQL, and thought an interesting exercise would be to generate

  • 0

Learning a little about T-SQL, and thought an interesting exercise would be to generate a Mandelbrot set with it.

Turns out someone already has (and recently, it appears). I’ll let someone else post it as an answer, but I’m curious what optimizations can be made.

Alternately, what would you do to make the code more readable?

I’ll select the most readable (yet reasonably compact) version as the accepted answer (too bad we don’t have rep bounties yet!) unless someone really comes along with a great optimization.

Bonus points to those answers that teach me a little something about T-SQL.

-Adam

  • 1 1 Answer
  • 2 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T20:45:32+00:00Added an answer on May 10, 2026 at 8:45 pm
    Create PROCEDURE dbo.mandlebrot @left float, @right float, @Top float, @Bottom float, @Res float, @MaxIterations Integer = 500 As Set NoCount On  Declare @Grid Table (     X float Not Null,      Y float Not Null,     InSet Bit    Primary Key (X, Y))  Declare @Xo float, @Yo float, @Abs float Declare @PtX Float, @PtY Float Declare @Iteration Integer Set @Iteration = 0 Select @Xo = @Left, @Yo = @Bottom  While @Yo <= @Top Begin     While @Xo <= @Right Begin         Select @PtX = @Xo, @PtY = @Yo         While @Iteration < @MaxIterations              And (Square(@PtX) + Square(@PtY)) < 4.0 Begin             Select @PtX = Square(@PtX) - Square(@PtY) + @Xo,                    @PtY = 2* @PtX * @PtY + @Yo             Select @Iteration, @PtX, @PtY             Set @Iteration = @Iteration + 1         End         Insert @Grid(X, Y, InSet)          Values(@Xo, @Yo, Case              When @Iteration < @MaxIterations                     Then 1 Else 0 End)         Set @Xo = @Xo + @res         Set @Iteration = 0     End     Select @Xo = @Left,             @Yo = @Yo + @Res End  Select * From @Grid 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am learning Rails and have very little idea about Sinatra & Merb. I
I am a little confused about the various methods' implementations. Actually, I was Learning
If someone knew little about databases and wanted to learn about them from scratch,
Started learning Wicket after ASP.NET MVC and feel a little bit confused about managing
I'm learning some basic stuffs in razor . I'm a little confused about the
As part of my learning process, I thought it would be good if I
I'm thinking about learning ruby and python a little bit, and it occurred to
I've recently been learning a little bit about Linux security and I want to
I've been learning SQL for about a day now and I've run into a
I'm learning C++ and writing little programs as I go along. The following is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.