# fitCircle: Fitting circle into point configuration In smacof: Multidimensional Scaling

## Description

Utility function for fitting a circle into 2D point configurations.

## Usage

 `1` ```fitCircle(x, y) ```

## Arguments

 `x` Vector with x-coordinates `y` Vector with y-coordinates

## Value

 `cx` x-coordinate center `cy` y-coordinate center `radius` circle radius

## References

Pratt, V. (1987). Direct least-squares fitting of algebraic surfaces. Computer Graphics, Vol. 21, pages 145-152.

## Examples

 ```1 2 3 4 5 6 7``` ```## Dataset on Schwartz values: require(plotrix) valsD <- 1 - cor(indvalues) fit <- mds(valsD) plot(fit, main = "MDS Value Circle") circle <- fitCircle(fit\$conf[,1], fit\$conf[,2]) draw.circle(circle\$cx, circle\$cy, radius = circle\$radius, border = "gray") ```

### Example output ```Loading required package: plotrix

Attaching package: 'smacof'

The following object is masked from 'package:base':

transform
```

smacof documentation built on July 21, 2021, 3 a.m.
{"ft_lang_label":"__label__en","ft_lang_prob":0.6197756,"math_prob":0.76137096,"size":526,"snap":"2022-40-2023-06","text_gpt3_token_len":142,"char_repetition_ratio":0.11111111,"word_repetition_ratio":0.0,"special_character_ratio":0.26425856,"punctuation_ratio":0.13541667,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9881272,"pos_list":[0,1,2],"im_url_duplicate_count":[null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-10-05T19:45:43Z\",\"WARC-Record-ID\":\"<urn:uuid:4d5799a2-24e0-465f-aa8f-62fa0d789908>\",\"Content-Length\":\"61579\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:607a9d10-2e8c-4404-bf3d-4bd4b5de73bf>\",\"WARC-Concurrent-To\":\"<urn:uuid:f0f8ffa5-5a75-45b1-a552-c86ea4a2d4f0>\",\"WARC-IP-Address\":\"51.81.83.12\",\"WARC-Target-URI\":\"https://rdrr.io/rforge/smacof/man/fitCircle.html\",\"WARC-Payload-Digest\":\"sha1:ZAQ7YFV37E52ORQ5IHINEPQWFDHPYT66\",\"WARC-Block-Digest\":\"sha1:6BKPOUYIJX7Z3TZKGVE55JWPRVMBYXPA\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-40/CC-MAIN-2022-40_segments_1664030337663.75_warc_CC-MAIN-20221005172112-20221005202112-00428.warc.gz\"}"}