Blog Archives

Swift Fractal Tree

Swift Fractal Tree Created By : Debasis Das (May 2016) Source Code // Swift Fractal Tree // Created by Debasis Das on 15/05/16. // Copyright © 2016 Knowstack. All rights reserved. import Cocoa import Foundation class Tree: NSView { let

Posted in algorithms, Swift Tagged with: , , , ,

Drawing in Swift Cocoa

Drawing in Swift – Cocoa In this post we will be implementing some simple drawing using Swift Cocoa. In this sample we have 6 Custom Views and each is a mapped to a custom subclass of NSView Swift – Drawing

Posted in Cocoa, Swift Tagged with: , , , ,

k-means Clustering Implementation in Cocoa, Objective C

K-means Clustering Implementation in Cocoa, Objective C Created By: Debasis Das (Definition of KMean Clustering: Sourced from Wiki) k-means clustering is a method of vector quantization, originally from signal processing, that is popular for cluster analysis in data mining. k-means clustering aims

Posted in algorithms, Cocoa, Generic, Objective C Tagged with: , , , , , ,

BubbleSort Algorithm Visualization in Cocoa, Objective C

Bubble Sort Algorithm Visualization in Cocoa, Objective C In the tutorial we will create a sample application that creates a visualization for each step of a sorting algorithm, The sorting algorithm chosen here for visualization is bubblesort as the focus

Posted in algorithms, Cocoa, Objective C Tagged with: , , , , ,

Creating Maps in Cocoa using NSBezierPath

 Creating Maps in a Cocoa App using NSBezierPath In this tutorial we will create the USA Map using NSBezierPath. The final output of the tutorial is as follows Please note that the map coordinates used in this tutorial is not

Posted in Cocoa, Objective C Tagged with: , ,

NSBezierPath Curves and Graphs

NSBezierPath Curves and Graphs In this sample code we will create the below output using NSBezierPath. Here we primarily using moveToPoint , lineToPoint & curveToPoint methods of NSBezierPath // // GraphView.h // KSSineCurve // // Created by Debasis Das on 5/13/14.

Posted in Cocoa, Objective C, Swift Tagged with: , , ,

Drawing in Cocoa, Objective C using NSBezierPath

NSBezierPath appendBezierPathWithArcWithCenter @implementation RainbowView -(void)drawRect:(NSRect)dirtyRect { [[NSColor blackColor] set]; NSRectFill(dirtyRect); [[NSColor whiteColor] set]; NSBezierPath * path = [NSBezierPath bezierPath]; [path setLineWidth:10.5]; float xMargin = 0; float yMargin = 0.0; float maxWidth = dirtyRect.size.width – 2 * xMargin; float maxRadius =

Posted in Cocoa, Objective C, Swift Tagged with: , , , , , ,

Recent Posts


Hit Counter provided by technology news